【发布时间】:2021-03-03 08:33:14
【问题描述】:
我通过vcpkg install grpc 安装 grpc 并将其添加到 cmake 文件中。
现在我想生成 grpc c++ 文件,我运行:
protoc --cpp_out=grpc_file/ --grpc_out=grpc_file/ --proto_path=grpc_proto/ ./grpc_proto/side_information.proto
返回错误:
protoc-gen-grpc: program not found or is not executable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
如何使用 vcpkg 安装的 grpc_cpp_plugin ? 我的工作空间是:
.
├── CMakeLists.txt
├── Readme.md
├── build
├── build_envs.sh
├── grpc_file
├── grpc_proto
├── main.cpp
├── twitter.json
└── vcpkg
【问题讨论】:
-
我知道这不是您要寻找的答案,但如果您在使用 vcpkg 时遇到问题,请尝试 bazel/cmake github.com/grpc/grpc/tree/master/src/cpp#grpc-c。 Bazel/CMake 是 gRPC 开发人员使用的
-
你检查过stackoverflow.com/questions/64404450/… 不一样,但可能会帮助你看看你是否缺少一些包
-
你能在 CMake 中显示你的配置吗
-
@DachuanZhao 我的回答对您有帮助吗,还是您需要更多帮助?