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了