I'm converting a proto2 c interface to a proto3 c++ interface and have stumbled upon a problem related to import of proto files. Version 3.11.4 of protocol buffers is used in a Debian 10 environment.
I have a general.proto file which is imported by numerous other proto-files and this worked fine with the old setup but the proto3 version of the generated code won't compile due to that a reference to a feature in general.pb.h is wrong giving compile errors like: *src/generated/xxxx.pb.cc:18:8: error: ‘PROTOBUF_INTERNAL_EXPORT_General_2eproto’ does not name a type; did you mean ‘PROTOBUF_INTERNAL_EXPORT_General_5fclean_2eproto’?* * extern PROTOBUF_INTERNAL_EXPORT_General_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Result_General_2eproto; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PROTOBUF_INTERNAL_EXPORT_General_5fclean_2eproto * The suggested reference is the correct one and if I a manually replace PROTOBUF_INTERNAL_EXPORT_General_2eproto with PROTOBUF_INTERNAL_EXPORT_General_5fclean_2eproto the file will compile. If I merge all proto-files to one file to avoid using import everything works fine. Any ideas for how to solve this besides from using one huge proto-file? Regards, Anders -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/d56cc5b1-2337-4d8a-9dac-371747598ad3n%40googlegroups.com.
