It sounds like you are somehow mixing multiple versions of the protobuf
library. I would guess that your system has an older version of protobuf
installed by the distribution package manager and that this version is
being used by QtCreator. If that's the case then you may have to tweak the
QtCreator settings so that it finds your new protobuf library that you
built from source, instead of using the older system-wide version.

On Fri, Feb 10, 2017 at 2:11 AM, Mübin Icyer <mubinic...@gmail.com> wrote:

> Hi,
> 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
> "proto2"
>
> I compile the proto file manualy i.e.:
>
> protoc --cpp_out=/path/to/project --proto_path=/path/to/project
> /path/to/project/protocol.proto
>
> 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 `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata
> const*, int)'
> protocol.pb.o: In function `protocol::protobuf_protocol_
> 2eproto::TableStruct::InitDefaultsImpl()':
> /path/to/project/../../TCPServer/protocol.pb.cc:121: undefined reference
> to `google::protobuf::internal::InitProtobufDefaults()'
> .....//some other errors
>
>
> What is the problem? How can I solve it?
>
> Thanks.
>
>
>
> --
> 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.
>

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