工程设置中修改:
"使用标准 Windows 库"
改成:
"在静态库中使用 MFC"
出错:
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fprintf.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fwrite already defined in LIBCMT.lib(fwrite.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _vsprintf already defined in LIBCMT.lib(vsprintf.obj)
1>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
......
再改回"使用标准 Windows 库"也一样编译不了,
与修改前的.vcproj文件进行比对,发现经过这两个修改之后与原配置不一样:
增加了一个UseOfMFC="0",这是原来没有的
RuntimeLibrary="0" 原来的数值是RuntimeLibrary="2"
把这两项改回去了才能够正常编译。
阅读(1790) | 评论(0) | 转发(0) |