VC 静态连接库问题

来源:百度知道 编辑:UC知道 时间:2024/06/18 23:28:03
为什么编译会出现这种错误
--------------------Configuration: MFC_COUNTER - Win32 Debug--------------------
Linking...
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in libcmtd.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "mfc42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfco42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/MFC_COUNTER.exe : fatal error LNK1169: one or more multiply defined symbols found
执行 link.exe 时出错.

MFC_COUNTER.exe - 1 error(s), 0 warning(s)

是哪个地方没有设置好吗?解决过程详细一点 谢谢

好像是库连接冲突,加上选项/NODEFAULTLIB:msvcrtd.lib,这个在工程属性里边设置