1. 程式人生 > >error LNK2005:XXXX already defined in XXX.lib

error LNK2005:XXXX already defined in XXX.lib

設定工程時,出現類似如下錯誤:

msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" ([email protected]

[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) already defined in USBInfo.lib(USBInfoInterface.obj)

解決方法:修改工程屬性--配置屬性--c/c++--程式碼通用--實時庫型別