--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/614101fd-9571-448b-9b29-0ae050e536cfn%40googlegroups.com.
I am invoking protoc –descriptor_set_out on the .proto file with contents described below that include the definition of the custom option. I’m not sure what else you are suggesting I include.
I attached the .proto file to clarify the reproduction steps.
protoc –descriptor_set_out simple.proto
Use this snippet of code to parse the resulting .desc file:
fdiName = “simple.desc";
std::ifstream fdi(fdiName);
google::protobuf::FileDescriptorSet fds;
auto r = fds.ParseFromIstream(&fdi);
assert(r);
The assertion will fail
Best,
Marc
Thank you for the pointers Adam. The string did not match the file on disk because I neglected to open the file in binary mode. Commenting out the custom option coincidentally made everything work leading me down the rat hole but the real fix is to open in binary mode and then everything works.