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 / Linker problems with DarkGDK

Author
Message
celavek
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location:
Posted: 27th Nov 2008 15:16
Hi all,

I'm having some problems building my project using DarkGDK. I'm using VS Express 2008, DrakGDK with the latest fixes and the August 2007 DXSDK. I link my project against the multi threaded debug runtime libraries (/MTd). I have the following libraries in the list of Ignore Specific Library " libc, msvcrt, libcd, msvcrtd, libcmt" as advised in the following link http://msdn.microsoft.com/en-us/library/6wtdswk0(vs.71).aspx . Also i have the following preprocessor defines WIN32;_DEBUG;_WINDOWS. Unfortunately i get a lot of linker errors referring to unresolved external symbols (see below):

1>system.lib(dxdiaginfo.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>convx.lib(ConvX.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>convmd3.lib(ConvMD3.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>convmdl.lib(ConvMDL.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(ProcessHSR.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>world.lib(Patch.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>multiplayer.lib(CNetwork.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>system.lib(CSystemC.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(NVMeshMenderD3DX.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(CBSPTree.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(CSG.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(CCompiler.obj) : error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced in function "public: void __thiscall cCompiler::Release(void)" (?Release@cCompiler@@QAEXXZ)
1>display.lib(CGfxC.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(DBOFormat.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(Universe.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo
1>basic3D.lib(cLightMaps.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo

As you can see from the message most of the libraries are DarkGDK specific. I realized that it might be possible that the libraries (DarkGDK ones) are built only for release and i do not have the debug ones. Is this true?Does this mean i cannot build my game with debug information in order to be able to debug it?
I tried out the following:
1) I removed the libcmt.lib from the list of inclusions => of course i get not multiple defined symbols
2) I tried linking with the multi threaded runtime libraries without the debug info (/MT), adjusting accordingly the ignored libraries => I get the following linker errors

1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Matrix2D.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: class Vector2D & __thiscall std::vector<class Vector2D,class std::allocator<class Vector2D> >::operator[](unsigned int)" (??A?$vector@VVector2D@@V?$allocator@VVector2D@@@std@@@std@@QAEAAVVector2D@@I@Z)
1>Geometry2D.obj : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)

3) I tried out various combination not worth mentioning here with the same success.

Does anyone know what should i do? What flavor of the runtime libraries should i use? Where can i get the DarkGDK libs built for debug (with the debug info)?
It seems that i cannot sort out these linker errors building for debug.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Nov 2008 15:55
You can build in debug mode, but you have to use the release libraries to do so.

I use these settings to compile in debug, and to also allow me to use the STL:
C++ -> Preprocessor -> Preprocessor Definitions = <blank>
C++ -> Code Generation -> Runtime Library = Multi-threaded (/MT)

You'll still be able to debug your code even though you will be using release libraries.

celavek
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location:
Posted: 27th Nov 2008 16:04
Thanks! It worked!

What were those preprocessor definitions for? I'm working with the Dark Invaders project from the tutorials section and i did not remove them as they were specified by default.


"You'll still be able to debug your code even though you will be using release libraries."

I'm aware of that. Unfortunately i was not able to generated my executable with the debug info.

Thanks again!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Nov 2008 17:12
To be honest, I can't remember - they may have been a hold-over from an earlier version of the GDK because when I create a new project now, the entry for the preprocessor options is already blank.

Login to post a reply

Server time is: 2024-11-25 07:36:51
Your offset time is: 2024-11-25 07:36:51