Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / EZrotate linking error

Author
Message
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 17:12 Edited at: 28th Nov 2007 20:47
Hi,

I get these linking errors with EZro_LX, EZro_LY, EZro_LZ, EZro_GX, EZro_GX, EZro_GX and others:



I'm using VS2005 standard. The project has multiple files. The .cpp containing itself the EZRotate functions compiles fine. It fails at linking.
However some other EZRotate commands at the same file like EZro_Matrix2AxisAngles and EZro_Matrix2Euler doesn't rise any linking errors, and build succeeds.

Any clue about what's happening?

Thanks in advance

[edit: oops, I meant EZro_GX, EZro_GY, EZro_GZ and not EZro_GX, EZro_GX, EZro_GX ]
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2007 18:00
I assume you have the directX SDK intalled? If so, is it included in your paths? EZrotate uses the D3DXMATRIX class that is defined in the DirectX SDK. Please see if you are able to include "d3dx9.h" in your project.

-Ron


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 19:01 Edited at: 28th Nov 2007 19:03
Yep, I've been using October 2006 DirectX SDK until now, since it was the one at the instructions when I installed DGDK.

Paths and all are set. I use D3DXMATRIX in some other places as well, and they raise no error.

I've been able to include "d3dx9.h" without any errors. Until now I was using "d3d9.h".

I've tried also to declare the D3DXVECTOR3 and D3DXMATRIX variables globally and locally, with no luck so far.

Still not figuring out what I might be doing wrong, it must be some other reason regarding the project or VS2005 setup...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2007 19:12
Quote: "I've tried also to declare the D3DXVECTOR3 and D3DXMATRIX variables globally and locally, with no luck so far."


I think that is the key. If you can get that to work, then all should be OK.

Have you tried to compile in both release and debug?


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 19:19
Sorry, it seems I've mislead you.

What I tried to say is that I can succesfully declare the D3DXVECTOR3 and D3DXMATRIX variables globally and locally, but the link error raises at both cases. It doesn't matter where the variables are declared.

I'm using release mode all the time.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2007 19:47
This is a hard thing for me to debug without being able to see!

Are you sure that the DirectX SDK lib folder is included in the lib portion of the VC++ include directories? I would reccomend re-checking that path.


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 20:22
Don't worry, I understand it is not that easy to find the problem if this is the 1st time happening.

I double-checked the paths for library & include files, and they both have the route to the DirectX SDK.

I would think that the setup is fine, as I've been using the engine fully for quite long with this project, including DarkShader and some other things, but surely I must be missing something else. Thanks all along, any suggestions are welcome.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Nov 2007 20:32 Edited at: 28th Nov 2007 20:33
As long as there are no other errors, those errors simply mean it can't find the definitions of those functions, and it shouldn't be related to the declaration of any variables or structures.

It sounds like you've got the prototypes somewhere but not the actual functions, perhaps if they are spelt differently.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 20:45 Edited at: 28th Nov 2007 20:46
Yep, that makes sense to me, but the compiler -can- find them when the file is compiled alone. It seems it is the linker who doesn't find them, uh.

As I said, I agree that it can't be the D3DXVECTOR3 and D3DXMATRIX declarations because, I've been able to use EZro_Matrix2AxisAngles and EZro_Matrix2Euler functions, and they use those D3DXVECTOR3 and D3DXMATRIX without any problems...It compiles and links the whole project.

The error raises only with some specific funtions that, as far as I've tested, are:

EZro_LX, EZro_LY, EZro_LZ, EZro_GX, EZro_GY, EZro_GZ and EZro_Vector.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Nov 2007 20:50 Edited at: 28th Nov 2007 20:51
Quote: "but the compiler -can- find them when the file is compiled alone"

Are there any calls to these functions from within this file itself then? After all, you can declare prototypes without the actual functions themselves and you won't get an error unless you try calling the functions, in which case the linker will complain about an unresolved symbol.

Also, is this file included for compilation in the project? May seem like a silly question, I don't know.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Nov 2007 21:02
Quote: "Are there any calls to these functions from within this file itself then?"

Sure that's the point, that .cpp has all the EZRotate functions that we are talking about. So it has calls to them. Some of them link and some other doesn't.

Sure it is included for compilation, and it has more functions into it. No worries, there are no silly questions
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 28th Nov 2007 21:11
Quote: "Sure that's the point, that .cpp has all the EZRotate functions that we are talking about."

Do any of them actually call each other though? If the functions in that file don't call each other, then even if the prototypes are wrong it'll compile on its own just fine anyway.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2007 21:33
Morcilla,
Are you able to compile any of the EZrotate example projects?


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 29th Nov 2007 13:49 Edited at: 29th Nov 2007 14:09
@Benjamin, sorry I don't get what you're saying. Could you post an example of "the functions in that file calling each other"...mmm all the functions are called from some other file.

@Ron, good question, as I'm unable to compile the simple examples with just one file, so we better forget about the multi-file setup.
Let's see, this is what I get when I try to compile example one:



However this code builds fine (example1 with commented EZro_G functions):



As you can see, there are some other used EZRotate functions at the code that still build fine, so that's what confuses me, shouldn't it be all or none?

By the way, if I open the examples .sln file, I get the link errors shown above. If I open the .dsw file i get this:



If I accept the dialog, then even more link errors appear. Please note that I'm using VS2005 Professional Edition.

Also, I forgot to comment that 'EZrotate.h' has been placed at the DGDK includes folder, while 'EZrotate.lib' is at LibVS8, DGDK libraries folder.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 29th Nov 2007 13:55
I attach the whole solution & project files used for example1.

Attachments

Login to view attachments
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Nov 2007 14:20 Edited at: 29th Nov 2007 14:28
Quote: "sorry I don't get what you're saying"

Well when you say the linker can find them when the file is compiled alone, which file are you referring to?

In the example you posted, I can see you including a header file but there is no source file included or library linked for the functions, which is probably your problem. Headers (usually) only contain declarations, not actual definitions. The fact that some functions actually work makes this more confusing...

I'm not sure how it's supposed to be set up as I don't have EZrotate (or DGDK for that matter), however is a DLL used for EZrotate or a static library?

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 29th Nov 2007 15:28
Quote: "however is a DLL used for EZrotate or a static library?"


It is a lib file.
Thanks for all of your input on this Benjamin. I really appreciate your help. If you ever are interested, I'll ask TGC to throw a copy of EZrotate your way for your efforts

Morcilla,
I'll try to look at your project tonight. I am off to work now and will be on site somewhere with no access to the internet. So, I won't be able to answer any questions for a few hours. Thanks for your patience. I'm sure we will get it working. It is probably something simple that I am just not thinking of at the moment!


a.k.a WOLF!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Nov 2007 16:57
Quote: "Thanks for all of your input on this Benjamin. I really appreciate your help."

No problem, I've just felt in a mood to help people a lot lately. Now if only I was in a mood to fix problems with my own projects...

Quote: "If you ever are interested, I'll ask TGC to throw a copy of EZrotate your way for your efforts"

Thanks, I'll be sure to take you up on that offer if need be eventually.

Quote: "It is a lib file."

Ah ok. Is there a #pragma comment to link with that library in EZRotate.h or something? Else I can't see where it's being linked with, as the project settings contain no references to it.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 30th Nov 2007 04:14 Edited at: 30th Nov 2007 19:14
Quote: "Ah ok. Is there a #pragma comment to link with that library in EZRotate.h or something? Else I can't see where it's being linked with, as the project settings contain no references to it."


Yes. Here is the entire header:




a.k.a WOLF!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Nov 2007 07:29 Edited at: 30th Nov 2007 07:29
Ok, the only possibility I can think of is that perhaps some of the prototypes in the header aren't the same as the functions in the library. Other than that, I can't see what could be wrong.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 30th Nov 2007 12:10
Quote: "Ok, the only possibility I can think of is that perhaps some of the prototypes in the header aren't the same as the functions in the library. Other than that, I can't see what could be wrong."

But they are!
I dowloaded Morcilla's project and everything compiled fine. I had to exclude one file (quartz.lib), but other than that, it just worked. I did this with VS2005 Standard.

Morcilla,
Have you had EZrotate and GDK for a while? Is it possible that the old version's lib is still in your paths somewhere? Can you tell us what directories are listed for your VC++ paths for libs and includes?


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Nov 2007 18:21 Edited at: 30th Nov 2007 18:22
Ron, I have DGDK since 2005, but I just downloaded and installed EZRotate once. The current available one. Also I use DGDK 120307, I think there's no mixing of libraries.

These are the VC++ paths listed for libs and includes:



I guess still no clue about why some commands link and some others doesn't. Now I have another question:
Has anyone around downloaded the current EZRotate version and compiled any of the examples succesfully?

Attachments

Login to view attachments
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 30th Nov 2007 19:28 Edited at: 30th Nov 2007 19:51
Solved!
Ho-hum. It looks like it is MY fault after all.

At some point in the change-over to this new version, I decided to use floats instead of doubles. They are faster because they are much smaller. Somehow, the lib that became part of the installer is still expecting doubles. I'm not sure what happened here, but I do know what to do to fix it. Please replace the contents of your "EZrotate.h" file with what I posted above as a temporary fix. I will find get a new version of the lib created and send it over to Mike so he can update the installer.

I am really sorry for the problem. All seemed fine on my end because my paths were pointing to a location that had a lib that worked with that header. I'll get things fixed ASAP!

Edit:
I just fixed the problem in the lib and sent Mike the new version. I will let you know as soon as it is uploaded!


a.k.a WOLF!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Nov 2007 19:56
Quote: "All seemed fine on my end because my paths were pointing to a location that had a lib that worked with that header."

Oh the irony.

Glad to hear the problem's found and fixed.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 30th Nov 2007 20:12
Quote: "Oh the irony."


Agreed.


a.k.a WOLF!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Nov 2007 20:23 Edited at: 1st Dec 2007 12:25
Ok it seems working fine when using the EZrotate.h header that you posted above, as you said.

So I'm getting the 'doubles' version, well, it could be even more appropriate for my project needs than the floats one.
Nevertheless, I'll make sure to download the floats version as well.

Glad to help, thanks for your quick response & support.

[Edit: Yeah Benjamin, you were right after all! ]

[Edit2: Well I'm thinking that D3DXVECTOR3 and D3DXMATRIX only fill up with floats, so doubles may not be that useful after all...]

Login to post a reply

Server time is: 2024-11-19 17:46:04
Your offset time is: 2024-11-19 17:46:04