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 / Build errors when using DarkPhysics

Author
Message
fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 2nd May 2008 18:57
Hi all,

This may be a nooby question (I apologise in advance!)...

I'm working on a simple demo and everything was going well until I added dbPhyStart( ); to my code... it's within void DarkGDK ( void ) and before the program loop. I've included the #include "DarkPhysics.h" header at the top of prog and all the headers/libs seem to be in the correct directories and tagged within C++ 2008. Just to let you know, the GDK samples compile okay and I have followed their format.... i've only added the header and dbPhyStart(); LOL!

anyway...the linker error i'm getting is:

Main.obj : error LNK2019: unresolved external symbol "void __cdecl dbPhyStart(void)" (?dbPhyStart@@YAXXZ) referenced in function "void __cdecl DarkGDK(void)" (?DarkGDK@@YAXXZ)

if i rem out the phystart command it compiles ok.

cheers for any help... i'm not new to DBPro but am to C++.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd May 2008 22:54
LOL....

I have a fudge... works for me, someone said its wrong but it WILL work for you!

In the Project Properties, under LINKER->Input There is a area for "Additional Dependancies".

Place the FULL PATH and FILENAME to your DarkPhysics.lib file... IN QUOTES!!!!! ... and life will be good again!

fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 2nd May 2008 23:26
Cheers Jason,

I'm getting the following errors now:

1>------ Build started: Project: Game 1, Configuration: Debug Win32 ------
1>Linking...
1>DarkPhysics.lib(EngineSetup.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1> Creating library Debug\Game 1.lib and object Debug\Game 1.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __malloc_dbg
1>libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __free_dbg
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>Debug\Game 1.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://i:\DBPro_C++\Game_1\Debug\BuildLog.htm"
1>Game 1 - 4 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped


Same as before, if I rem out the phystart() command it compiles fine.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd May 2008 23:32
I think you need to now exclude LIBCMT.LIB or something.. search for linker errors in this thread or google darkgdk linker error.

fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 2nd May 2008 23:36
Jason, i think i've fixed it....

LIBCMTD, msvcprtd, atls, libcpmtd

needed to be added into another box within the same section. Still getting a few linker warnings but the program is atleast compiling so that is a step in the right direction.....

Thanks again.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd May 2008 23:38
Yeah - I get warnings galore... but... runs

Login to post a reply

Server time is: 2024-11-20 09:30:08
Your offset time is: 2024-11-20 09:30:08