I'm trying to use standard complex library along with DarkGDK, but it doesn't work. Even if I generate empty DarkGKD game with MS Visual C++ wizard and add line "#include <complex>", following error occures:
1>Linking...
1>libcpmtd.lib(xdebug.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
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)
1>Debug\novo.exe : fatal error LNK1120: 2 unresolved externals
I tried to exclude "libcpmdt.lib" (Project > Properties > Linker > Input); however, this error followed:
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new[](unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??_U@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) referenced in function "public: char * __cdecl std::_DebugHeapAllocator<char>::allocate(unsigned int,void const *)" (?allocate@?$_DebugHeapAllocator@D@std@@QAAPADIPBX@Z)
1>Main.obj : error LNK2019: unresolved external symbol "struct std::_DebugHeapTag_t const & __cdecl std::_DebugHeapTag_func(void)" (?_DebugHeapTag_func@std@@YAABU_DebugHeapTag_t@1@XZ) referenced in function "public: char * __cdecl std::_DebugHeapAllocator<char>::allocate(unsigned int,void const *)" (?allocate@?$_DebugHeapAllocator@D@std@@QAAPADIPBX@Z)
1>Debug\novo.exe : fatal error LNK1120: 2 unresolved externals
Does anybody know, what to do? Other standard libraries (vector, list..) work without problem.
And here is the code:
#include "DarkGDK.h"
#include <complex>
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
while ( LoopGDK ( ) )
{
dbSync ( );
}
return;
}