1
votes

Doing Google’s tutorial for Protocol Buffers: https://developers.google.com/protocol-buffers/docs/javatutorial

Trying to compile it into a java file using: protoc -I=/home/Eggy/Desktop/Test/ --java_out=/home/Eggy/Desktop/Test/addressbook.proto

Error is: Missing input file

For some reason the file in the folder is unrecognised. If I press tab the file doesn't show in cmd

Doing it this way: Missing input file with protoc in protocol buffer and this way https://groups.google.com/forum/#!topic/protobuf/y2mxdn1vKGY

Brings up a different error^:

File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).

I also created the file as a text file and saved it as a .proto if that helps in Sublime Text.

1

1 Answers

2
votes

Your command is slightly off. The --java_out parameter needs to specify the destination folder, not the input file, and then you need a space before you list the input file.