Archived

This topic is now archived and is closed to further replies.

DX7 - Linker - multiply defined symbols

This topic is 6023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Two lines have been the bane of my existence for the last week or so - both cheerfully given by the linker... quinkin.obj : error LNK2005: "struct _GUID d3dgid" (?d3dgid@@3U_GUID@@A) already defined in 3dapp.obj Debug/Quinkin.exe : fatal error LNK1169: one or more multiply defined symbols found d3dgid is defined as such : GUID d3dgid; If I comment out all uses of the variable except the declaration, the errors persist. The header file declarations, where the above line resides, is safely encapsulated by #ifndef ... #endif. I have tried re-installing the SDK, trying static declarations... but nothing seems to make a difference. Am I not looking in the right place? Any help would be greatly appreciated as I attempt to make the transition from 2D to 3D. Thanks. Steele.

Share on other sites
maybe you have to include the file dxguid.lib into the list of
Object/Library modules of the Project settings.

Project---->Settings---->Link (and there you can include dxguid.lib into the modules line).

or put
#include

neil

Share on other sites
sorry this thing just messed up the code

#include initguid.h

with greater than and less than at either side

Not sure on HTML only C++
sorry

Neil

Share on other sites
In the .h file you should use:
extern GUID d3dgid;

And in ONE .cpp file you need to define it w/o the extern:
GUID d3dgid;

Share on other sites
Thanks guys! It seemed to be a bit of all of them! With a bit of shuffling about with includes, an extern declaration and rebuild, I have it working.
Ta for the help.
Steele.
Woooohoooooooooo!!!

• 10
• 15
• 14
• 18
• 15