How to compile multiple proto files in single command?
Here's an option using find
protoc --js_out=js \
-Iproto/ \
$(find proto/google -iname "*.proto")
The problem is that you are specifying --proto_path
as an absolute path but your proto files as relative paths. You can either drop the --proto_path
argument (it defaults to the current directory anyway), or you can do:
protoc --proto_path=C:\shekhar\proto_trial
--java_out=C:\shekhar\proto_trial\java_op
C:\shekhar\proto_trial\*.proto