Compiling 64 Bit libprotobuf v2.6.1 for Windows

1,274 views
Skip to first unread message

Bradley K

unread,
Oct 19, 2016, 3:30:22 PM10/19/16
to Protocol Buffers
I'm trying to use libprotobuf v2.6.1 in an x64 Windows C++ project.  The protobuf v2.6.1 .sln only contains Win32 platform configurations.  I manually added the x64 platform configurations, but when I compiled my x64 program with the new libprotobuf v2.6.1 x64 version linked, it issued numerous "possible loss of data" warnings and my program's unit tests failed.  Are protobuf v2.6.1 libraries just incompatible with x64 Windows C++ programs or am I compiling the library incorrectly?

Feng Xiao

unread,
Oct 19, 2016, 3:34:40 PM10/19/16
to Bradley K, Protocol Buffers
On Wed, Oct 19, 2016 at 12:11 PM, Bradley K <brad...@gmail.com> wrote:
I'm trying to use libprotobuf v2.6.1 in an x64 Windows C++ project.  The protobuf v2.6.1 .sln only contains Win32 platform configurations.  I manually added the x64 platform configurations, but when I compiled my x64 program with the new libprotobuf v2.6.1 x64 version linked, it issued numerous "possible loss of data" warnings and my program's unit tests failed.  Are protobuf v2.6.1 libraries just incompatible with x64 Windows C++ programs or am I compiling the library incorrectly?
It certainly works on x64 windows as we have tested it before release. Though it requires some manual tweaking of the vs project files to make it work. I recommend using the latest v3.1.0 version because it comes with cmake support and you can generated x64 version vs project files directly. See:
 

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Bradley K

unread,
Oct 19, 2016, 5:41:04 PM10/19/16
to Protocol Buffers
Thank you! I will give v3.1.0 a shot.
Reply all
Reply to author
Forward
0 new messages