123456

 

LNK2005

这个问题在编译Detours时遇到两次了,总结下:

显示为:

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 LIBCMTD.lib(typinfo.obj)2.MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)3.LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library4..\Debug/project.exe : fatal error LNK1169: one or more multiply defined symbols found


原因很简单,就是把C/C++-->Code Generation-->Runtime Library改为一致就OK了 

关于编译选项所对应的链接库,可以参考msdn以下连接:

 http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

posted on 2012-09-12 17:38  hgy413  阅读(182)  评论(0编辑  收藏  举报

导航