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

My project used the latest mysqlpp and protobuf3.0. I compiled them and link them in my project static. I try compile mysqlpp with MYSQLPP_NO_DLL and without MYSQLPP_NO_DLL defined, and change the libprotobufd.lib and mysqlpp_d.lib link order. But vs2013 always tell me the multiply defined symbols found error. Could you help me? Thank you.

pomato
  • 1
  • 1
    both protobuf/mysqlpp and my project compile with DLL(/MDd) option. – pomato Mar 27 '17 at 03:04
  • Probably It is caused by cycle reference since I put all header files in "stdafx.h". I split the header files of my project into each cpp then it works. – pomato Mar 27 '17 at 10:49

0 Answers0