You have to use the --proto_path
command-line flag (aka -I
) to tell protoc
where to look for .proto
files. If you don’t provide a path, by default it will only search the current directory. See the documentation (under “Generating Your Classes” at the end of the page), or type protoc --help
.