Compiling in VS2013: Error LNK2001 using C ++

I am trying to compile my game with Visual Studio 2013. The game uses Box2D, but when compiled in Release mode, the Box2D.lib release gives errors. It works fine when compiled in debug mode using debug Box2D.lib.

I get 135 errors, and basically something like these three:

1>Box2D.lib(b2CollideEdge.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>MyContactListener.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)"
(__imp_?_Winerror_map@std@@YAPBDH@Z)
1>Box2D.lib(b2ContactManager.obj) : error LNK2001: unresolved external symbol _atexit

      

I have created Box2D.lib several times and I am sure that I am linking to the correct release and debug library.

I tried to disable the / GS (buffer safety check) compiler flag, but it didn't help.

To build Box2D.lib and compile the game, I use the Multi-threaded DLL (/ MD) flag for the runtime library.

EDIT: I got rid of the "@__ security_check_cookie @ 4" errors when I linked to the "bufferoverflowU.lib" library. However, 133 errors remain.

+3


source to share


1 answer


You probably disabled linking of the default runtime libraries in the linker options. Right click on the project and go to properties. In the Linker-> Input section, set the "Ignore all libraries by default" option to "No".



0


source







All Articles