Good evening. I'm currently attempting to integrate the protocol buffer 
library into an embedded code project I'm assigned to, which uses Windows 7 
to flash code onto hardware. 

I have followed this guide <goog_1006182188> to installing the protocol 
buffer libraries/binaries on windows, and believe I am very close to 
getting my project to compile. Currently, I have the following directory 
structure:

Desktop
  install
    bin
    include
    lib
  ProtoTest
    data_revised.pb.h
    data_revised.pb.cc
    main.cc


Where ProtoTest is where the code I want to compile resides, and the 
*install* folder resulting from the compilation contains the binary for the 
protobuffer compiler, as well as the includes and libraries. 

I wish to run the following command: 

g++ -std=c++14 -L/cygdrive/c/Users/<username>/Desktop/install/lib/ \
              -lprotobuf \
              -I/cygdrive/c/Users/<username>/Desktop/install/include \
               ProtoTest/data_revised.pb.cc ProtoTest/main.cc


However, when I run it, I get errors of this form: 
 g++ -std=c++14 -L/cygdrive/c/Users/solarcar/Desktop/install/lib/ 
-lprotobuf -I/cygdrive/c/Users/solarcar/Desktop/install/include 
ProtoTest/data_revised.pb.cc ProtoTest/main.cc

In file included from ProtoTest/data_revised.pb.cc:4:0:
ProtoTest/data_revised.pb.h:181:8: error: 'void 
IntTriplet::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) 
const' marked 'final', but is not virtual
   void SerializeWithCachedSizes(
        ^~~~~~~~~~~~~~~~~~~~~~~~
ProtoTest/data_revised.pb.h:183:35: error: 'google::protobuf::uint8* 
IntTriplet::InternalSerializeWithCachedSizesToArray(google::protobuf::uint8*) 
const' marked 'final', but is not virtual
   ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
   

If I recompile the protocol buffer I'm using, I get slightly different 
errors:
/tmp/ccRjenfk.o:data_revised.pb.cc:(.text+0x22): undefined reference to 
google::protobuf::internal::VerifyVersion(int, int, char const*)
or
...:data_revised.pb.cc:...:undefined reference to 
"google::protobuf::Message::SpaceUsedLong() const"


I'm a bit more lost as to how to fix this more recent error, since I am 
(hopefully) including the libraries correctly.

Is there any way I can verify the library is indeed being installed 
correctly? 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/4c3b5d37-63c3-4578-8cbf-2db718a7d181%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to