Re: [protobuf] Does protobuf work in Visual Studio 2008 Express?

2010-09-20 Thread Nick Carter
The chromium project build libprotobuf using VS2008 without needing any code
changes, so you're likely experiencing an issue with the solution or project
files.  With chromium, we generate our own projects instead of using those
that come with the protobuf library.

If you were to follow
http://dev.chromium.org/developers/how-tos/build-instructions-windows, the
'gclient' script should auto-generate a valid VS2008 project file for you.
 I'm not sure if that would meet your needs or not, or if it would be easier
to simply debug the linker errors you see head-on.

 - nick

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:

 1msvcprt.lib(MSVCP90.dll) : error LNK2005: public: __thiscall
 std::basic_stringchar,struct std::char_traitschar,class
 std::allocatorchar ::basic_stringchar,struct
 std::char_traitschar,class std::allocatorchar (class
 std::basic_stringchar,struct std::char_traitschar,class
 std::allocatorchar  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.comprotobuf%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.



Re: [protobuf] Does protobuf work in Visual Studio 2008 Express?

2010-09-20 Thread Jason Hsueh
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=protobufq=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:

 1msvcprt.lib(MSVCP90.dll) : error LNK2005: public: __thiscall
 std::basic_stringchar,struct std::char_traitschar,class
 std::allocatorchar ::basic_stringchar,struct
 std::char_traitschar,class std::allocatorchar (class
 std::basic_stringchar,struct std::char_traitschar,class
 std::allocatorchar  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.comprotobuf%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.