Status: New
Owner: ken...@google.com
Labels: Type-Defect Priority-Medium

New issue 160 by gil.levy: Linker errors when the project is statically linked with MFC in VS2008
http://code.google.com/p/protobuf/issues/detail?id=160

What steps will reproduce the problem?
1.Create a proto sample and generate pb.cc and pb.h
2.Create a VS2008 win32 console project, add the above files, add
additional dependencies libprotobuf
3.Build and it compiles and links fine
4.Change the project settings to link statically with MFC ('Use MFC in a
Static Library')


What is the expected output? What do you see instead?
Expectd: successful build
Actual: linker errors complaining that basic_string is already defined in
the pb object.
1>Linking...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const *
__thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::data(void)const " (?d...@?$basic_string@DU?
$char_tra...@d@std@@v?$alloca...@d@2@@std@@QBEPBDXZ) already defined in
person.pb.obj

What version of the product are you using? On what operating system?
2009-01-08 version 2.3.0

Please provide any additional information below.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.


Reply via email to