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 errors..

Author
Message
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 28th Jun 2010 23:30
Hey, when I try to compile anything using the DarkGDK, I get these errors:

------ Build started: Project: what, Configuration: Debug Win32 ------
Compiling...
main.cpp
Linking...
LIBCMT.lib(_sqrt_.obj) : error LNK2005: _sqrt already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMT.lib(_fpinit_.obj) : error LNK2005: __fltused already defined in a previous module
LIBCMT.lib(_fpinit_.obj) : error LNK2005: __ldused already defined in a previous module
MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\tom\lolerific-game\source\what\Debug\what.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\tom\lolerific-game\source\what\what\Debug\BuildLog.htm"
what - 7 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I tried using /NODEFAULTLIB but that juat made it so it wouldn't recognise that DarkGDK entry point..
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 28th Jun 2010 23:31
are you sure you used the GDK wizard for VC++ when you created the project?

Bran flakes91093
15
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 28th Jun 2010 23:37
Did you use the wizard to create the new project?

Anyways, make sure you ignore these libraries (Linker->Input): libcmt, atls, msvcrtd
And set the subsystem (Linker->System) to WINDOWS
Also set the runtime library (C/C++->Code Generation) to /MT

“C++ : Where friends have access to your private members.”
-Gavin Russell Baker
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 28th Jun 2010 23:42
i did that and now i get these errors:

------ Build started: Project: whatt, Configuration: Debug Win32 ------
Linking...
libcpmtd.lib(xdebug.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
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)
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)
Debug\whatt.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Documents and Settings\tom\lolerific-game\source\whatt\whatt\Debug\BuildLog.htm"
whatt - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 28th Jun 2010 23:48
I read Bran Flakes post and that fixed it.

Login to post a reply

Server time is: 2024-07-04 11:03:08
Your offset time is: 2024-07-04 11:03:08