error LNK2005: _exit already defined in LIBCD.lib

转自 龙龙丁丁涵涵的搜狐博客


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

转自 龙龙丁丁涵涵的搜狐博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值