I'm trying to create a Dark GDK game with Box 2D physics, and I have come across a problem.
I can compile and run the basic Dark GDK 2D game. I can also compile and run a basic Box2D world using the console output. But when I try to put Box2D inside the working Dark GDK code. I get this linkage error.
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _floor already defined in LIBCMT.lib(_floor_pentium4_.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>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)
1>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)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Debug\Dark GDK Test Game.exe : fatal error LNK1169: one or more multiply defined symbols found
What does this error mean? I've checked and confirmed that all my libraries are there and properly linked.
This error happens every time I put in a line of Box2D code. Without that, it works. I can include the library without any issues.