Hello,

I've been trying to debug this error for a few hours now and I'm not making 
much progress. I have a project that has Protocol buffers living in 
separate subdirectories of the main project directory and I am using CMake 
2.8 for compilation. Since CMake has protobuf support, I am using the 
follow lines in each subdirectory with .proto files to generate my output 
classes:

file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto")
PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles})

Here's the problem: I have a protobuf, Simulation, that lives in the base/ 
subdirectory that has enabled extensions. In another subdirectory, called 
optical_designs/, I have the following .proto file:

import "base/simulation_config.proto";

message Triarm9Parameters {
 ....
}

extend mats.Simulation {
  optional Triarm9Parameters triarm9_params = 1000;
}

The protoc compiler is happy with this, since I used the --proto_path to 
set up the import path. However, when I go to compile, I get this error. 
Basically, it is adding the "base_2f" into the function name because of the 
"base/" in my import. Any ideas on how to fix this behavior?

/.../build/optical_designs/triarm9_parameters.pb.cc:78:11: error: 
      no member named 'protobuf_AddDesc_base_2fsimulation_5fconfig_2eproto' 
in
      namespace 'mats'; did you mean
      'protobuf_AddDesc_simulation_5fconfig_2eproto'?
  ::mats::protobuf_AddDesc_base_2fsimulation_5fconfig_2eproto();
  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          protobuf_AddDesc_simulation_5fconfig_2eproto
/.../build/base/simulation_config.pb.h:420:16: note: 
      'protobuf_AddDesc_simulation_5fconfig_2eproto' declared here
  friend void  protobuf_AddDesc_simulation_5fconfig_2eproto();


Thanks,
Phil

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to