I found the problem it was a silly mistake from my side. Instead of adding
the generated .pb.cc file to the project I was directly including multiple
.pb.cc files on to a single .cpp file(stdafx.cpp) causing multiple
definition error for common global functions.
Regards,
Abilash.G
On Monday,
Hi Kenton,
I am facing the same issue. In my case, I have multiple proto files created
under the same package. When I add more than one proto file from the same
package on to a project, each proto file is generating its own .pb.cc and
.h files and each generated file has the below two methods.
There shouldn't be any problem with omitting the package. The declarations
in your error message should not be appearing more than once. I can't tell
much from the error message. Can you investigate the generated code and see
whether it is actually double-declaring these things? If so, please
Having an error using code generated by protobuf (c++) version 2.2.0.
I include a bunch of generated .pb.cc files generated from .proto
files, none of which have packages defined.
as a result i'm getting a bunch of strange errors:
Error 1 error C2086: 'google::protobuf::GoogleOnceType