联系
Knight's Tale » 技术

Error: already defined in MSVCRT.lib(MSVCR100.dll)

2010-06-17 19:54

If you meet this error in VS, it's because you are mixing code that was compiled with /MD (use DLL version of CRT) with code that was compiled with /MT (use static CRT library). That cannot work, all source code files must be compiled with the same setting. Given that you use libraries that were pre-compiled with /MD, almost always the correct setting, you must compile your own code with this setting as well.

Reference:

[1]. http://stackoverflow.com/questions/2728649/error-lnk2005-xxx-already-defined-in-msvcrt-libmsvcr100-dllc-something-libcm