Julien PONNOU
unread,Mar 1, 2012, 9:41:39 AM3/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
Hello,
When I include several couples of .h/.cc in my project, I got the
following errors during the compilation:
error C2086: 'google::protobuf::ProtobufOnceType `anonymous-
namespace'::protobuf_AssignDescriptors_once_' : redefinition
see declaration of '`anonymous-
namespace'::protobuf_AssignDescriptors_once_'
error C2084: function 'void `anonymous-
namespace'::protobuf_AssignDescriptorsOnce(void)' already has a body
see previous definition of 'protobuf_AssignDescriptorsOnce'
error C2084: function 'void `anonymous-
namespace'::protobuf_RegisterTypes(const std::string &)' already has a
body
see previous definition of 'protobuf_RegisterTypes'
Basically, it's telling me these functions are declared in all couples
of .h/.cc. Using a different package for each couple of .h/.cc
corrects the problem, but I don't want to do so. Without using any
package, can someone explain me how to solve this error ?
Best regards,
Julien.