转自 龙龙丁丁涵涵的搜狐博客
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/M TQB_2D.exe : fatal error LNK1169: one or more multiply defined symbols found
I tried to do /NODEFAULTLIB:library, but it doesn't do anything, or does /NODEFAULTLIB:library mean /NODEFAULTLIBRARY:msvcrt.lib?
答:Hit alt + F7. Go to code generation (I think it's under the linker tab, but I am not sure and running Linux now, so I can't fire it up and check), and set the built to multithreaded DLL. It should fix the problem.
注:应该是 C/C++ tab 而不是 linker tab
转自 龙龙丁丁涵涵的搜狐博客