0
1>mysqlpp_d.lib(mysqlpp_d.dll) : error LNK2005: "public: __cdecl std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z) already defined in libprotobufd.lib(common.obj)
1>mysqlpp_d.lib(mysqlpp_d.dll) : error LNK2005: "public: void __cdecl std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ) already defined in libprotobufd.lib(common.obj) 
fatal error LNK1169: one or more multiply defined symbols found

我的项目使用了最新的mysqlpp和protobuf3.0。我编译了它们并将它们链接到我的静态项目中。我尝试使用 MYSQLPP_NO_DLL 编译 mysqlpp 并且没有定义 MYSQLPP_NO_DLL,并更改 libprotobufd.lib 和 mysqlpp_d.lib 链接顺序。但是 vs2013 总是告诉我多重定义的符号发现错误。你可以帮帮我吗?谢谢你。

4

0 回答 0