Hello,

I am trying to extend a protocol buffer that lives in a different directory 
(and module) in my project. The protobuf I am trying to extend is called 
Simulation and is in the package mats. The .proto file lives in a directory 
called base/. At the same level as base/ is a directory called 
optical_designs/, which houses the extending protobuf, called 
Triarm9Parameters, here is it's .proto file:

import "base/simulation_config.proto";

message Triarm9Parameters { ... }

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

I am using CMake 2.8's built-in Protobuf support to generate the output 
classes. In each directory with .proto files:

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

The error I am getting is given below. It looks like because my import has 
the "base/" in it, the "base_2f" is getting inserted into this function 
name. 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