MSVC has different versions of STL: it appears it may change between
compiler versions, and also between debug and release, even for the same
compiler version. You need to make sure that you build your project with the
same C runtime as the probouf lib. Here are some past threads on the issue:
http://groups.google.com/group/protobuf/search?group=protobuf&q=msvc+stl+linker+error

On Mon, Sep 20, 2010 at 10:00 AM, Navigateur <naveen.c...@gmail.com> wrote:

> I get 23 linker errors such as the following after linking to
> libprotobuf.lib:
>
> 1>msvcprt.lib(MSVCP90.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> >(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)" (??0?$basic_str...@du?
> $char_tra...@d@std@@v?$alloca...@d@2@@std@@q...@abv01@@Z) already
> defined in main2.obj
>
> Any clear guesses what I'm doing wrong, or do you need more info?
> Or is it limited to Visual Studio 2005? (that's what the project file
> was made for i.e. VS8.0, I'm using VS9.0).
>
> Ideas?
>
> --
> 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<protobuf%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
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