On Jun 19, 2012, at 13:53 , Justin Muncaster wrote:
> 1>Running C++ protocol buffer compiler on common/bar/bar.proto
> 1>common/foo/foo.proto: File not found.
> 1>bar.proto: Import "common/foo/foo.proto" was not found or had errors.
> I can fix the error by hacking FindProtobuf.cmake and passing in additional 
> include directories, but I run into problems down the line, which leads me to 
> think there must be a better way. Every example I see has all proto files in 
> one folder and does not have cross-library protobuf message dependencies.

This should work, and with the project you attached it does work (well, once I 
fixed a bad field number):

Yamnuska:project ej$ protoc --cpp_out=build common/bar/bar.proto
Yamnuska:project ej$ 

I don't know how CMake or this PROTOBUF_GENERATE_CPP rule works, but maybe you 
need to pass the appropriate --proto_path argument so it looks for the included 
.proto in the right place?

Good luck,



You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to