I was using protoc version 2.5 and wanted to update to protoc version 
3.2.0. I cloned the source code from git and successfully compiled it. The 
command protoc --version gives and output libprotoc 3.2.0. 
When I want to compile it in QtCreater it gives following error:

Unrecognized syntax identifier "proto3". This parser only recognizes 

I compile the proto file manualy i.e.:

protoc --cpp_out=/path/to/project --proto_path=/path/to/project 

It generates header and source files, protocol.pb.h and protocol.pb.c, then 
if I compile them with Build Project button in Qt, it gives following error:

protocol.pb.o: In function `protobuf_AssignDescriptors':
/path/to/project/../../TCPServer/protocol.pb.cc:91: undefined reference to 
`google::protobuf::internal::AssignDescriptors(std::string const&, 
google::protobuf::internal::MigrationSchema const*, 
google::protobuf::Message const* const*, unsigned int const*, 
google::protobuf::MessageFactory*, google::protobuf::Metadata*, 
google::protobuf::EnumDescriptor const**, 
google::protobuf::ServiceDescriptor const**)'
protocol.pb.o: In function `protobuf_RegisterTypes':
/path/to/project/../../TCPServer/protocol.pb.cc:102: undefined reference to 
const*, int)'
protocol.pb.o: In function 
/path/to/project/../../TCPServer/protocol.pb.cc:121: undefined reference to 
.....//some other errors

What is the problem? How can I solve it?


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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to