You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler output is sensitive to filename of the input.
So compiling google/protobuf/descriptor.proto will give different output than compiling just descriptor.proto, even if the file contents are identical.
So if you want to get the same output as the original, run:
version : 3.8.0
compile command:
protoc --cpp_out=./ google/protobuf/descriptor.proto -Igoogle/protobuf
then I got descriptor.pb.h. Howerver, this pb.h is different with the original google/protobuf/descriptor.pb.h.
e.g. I got:
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_descriptor_2eproto;
in my file.
while in the original file, it is:
extern PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto;
so, how to compile the descriptor.proto to get the right pb.h ?
by the way, I got a similar issue with
descriptor_table_proto_2fcommon_2eproto #6179
#6179The text was updated successfully, but these errors were encountered: