Re: [protobuf] Compiler issue when using FileDescriptor set in my own message

2012-06-05 Thread Jason Hsueh
I see, yeah, you typically want to have the include path for protoc by the root of your source tree, rather than enumerating all the different subdirectories you want to include. I'll make a note to find a place in the documentation to mention this; this seems to come up pretty frequently. On Tue,

Re: [protobuf] Compiler issue when using FileDescriptor set in my own message

2012-06-05 Thread Dan
Thanks Jason, this resolves the issue. I actually have separate directories for the protobuf code as well as my own. I use the '-I' option when calling protoc, which I pointed at the directory containing 'descriptor.proto'. When I moved that path up two directories and made the import statement

Re: [protobuf] Compiler issue when using FileDescriptor set in my own message

2012-06-04 Thread Jason Hsueh
The issue is import paths - the pre-generated versions of descriptor.pb.{h,cc} are generated relative to the source root. Instead of importing "descriptor.proto", you should have something like import "google/protobuf/descriptor.proto"; This should make the code generator reference the declared f

[protobuf] Compiler issue when using FileDescriptor set in my own message

2012-05-25 Thread Dan
Perhaps I am just missing something, however I am getting a compiler error that appears to be an issue with descriptor.pb.h. The error is this: "protobuf_AddDesc_descriptor_2eproto is not a member of google::protobuf", called from "void MyPackageName::protobuf_AddDesc_MyMessage_2eproto()". Bas