Jump to content
  • Advertisement

Archived

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

nosajghoul

Error in release, but not in debug ???

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I compile a somewhat complex arrangement of .h and .cpp files, and run it in Win32 Debug mode. Everythings peachy. But then I tried to build the Win32 Release version, and I get unresolved externals, specifically :

Audio.obj : error LNK2001: unresolved external symbol _GUID_DirectMusicAllTypes
cAudio.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicLoader
cAudio.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicLoader8
cAudio.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicPerformance
cAudio.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicPerformance8
cAudio.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicSegment
cAudio.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicSegment8
cVideo.obj : error LNK2001: unresolved external symbol _IID_IMediaEventEx
cVideo.obj : error LNK2001: unresolved external symbol _IID_IMediaControl
cVideo.obj : error LNK2001: unresolved external symbol _IID_IVideoWindow
cVideo.obj : error LNK2001: unresolved external symbol _CLSID_FilterGraph
cVideo.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
Release/gameengine1.exe : fatal error LNK1120: 12 unresolved externals
Error executing link.exe.

gameengine1.exe - 13 error(s), 0 warning(s)
 
Note they are for GUIDs and CLSIDs, things that shouldnt be unresolved if you have #define INITGUID (once and only once) and included #include <dmusicc.h> and #include <dmusici.h> etc... I have also linked : d3dxof.lib d3d8.lib d3dx8.lib dxerr8.lib dsound.lib on top of the stuff already there. What am I doing wrong? -Jason

Share this post


Link to post
Share on other sites
Advertisement
Are you sure that when you set up the linking, you did so for ALL CONFIGURATIONS, rather than (as is the default) just the current (Debug, at the time) configuration?


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
I set up release just now exactly as debug, and I got :

.
.
.Strmiids.lib(strmiids.obj) : error LNK2005: _MEDIATYPE_Text already defined in main.obj
Strmiids.lib(strmiids.obj) : error LNK2005: _MEDIATYPE_Audio already defined in main.obj
Strmiids.lib(strmiids.obj) : error LNK2005: _MEDIATYPE_Video already defined in main.obj
Strmiids.lib(strmiids.obj) : error LNK2005: _MEDIASUBTYPE_None already defined in main.obj
Release/gameengine1.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

gameengine1.exe - 356 error(s), 0 warning(s)



I was playing with it before the suggestion you made (it may yet proove helpful so thank you for the tip), and I got it down to one unresolved external : IID_Graph something or other.

After much thought.......

The error that caused 356 errors : DEFINING INITGUID MORE THAN ONCE!!!! Im a moron. Making sure the release was set up EXACTLY as debug worked, it now compiles perfectly.

Thanks,

-Jason

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!