I am having problems generating client and server code for a GRPC service. I'm adapting the instructions at grpc.io.
There is a single protobuf file test_interface.proto
defining my service and I've tried to build it with both of the following commands, run in the same path as this file:
protoc -I . --grpc_out=. --plugin=protoc-gen-grpc="C:\vcpkg\packages\grpc_x64-windows\tools\grpc\grpc_cpp_plugin" ./test_interface.proto
protoc -I . --grpc_out=. --plugin=protoc-gen-grpc=grpc_cpp_plugin ./test_interface.proto
Both of which result in the error:
--grpc_out: protoc-gen-grpc: The system cannot find the file specified.
I'm on Windows 10 and installed grpc v1.33.1 using vcpkg. This installs the development dependencies, but does not add their binaries to the system path. I've manually added the locations of protoc
and grpc_cpp_plugin
to the Path.
It's not clear to me which file it is failing to find, there were some syntax errors picked up earlier in test_interface.proto
So I know this file is being opened okay. I can also run grpc_cpp_plugin
from the command line without any problems.
Does anyone know why this is failing to build the client and server code?