GRPC生成各语言语句收集

Golang 举例

D:\Path\Golang\bin\protoc.exe -I D:/Coding/Golang/grpcTester/proto --proto_path="D:/Path/Golang/bin/include/google/protobuf" --plugin=protoc-gen-go=D:/Path/Golang/bin/protoc-gen-go.exe --go_out=plugins=grpc:D:/Coding/Golang/grpcTester/proto D:/Coding/Golang/grpcTester/proto/struct.proto

protoc路径 -I 程序路径 --proto_path=proto官方自带proto路径 --plugin=protoc-gen-go=protoc-gen-go路径文件名 --go_out=plugins=grpc:编译的程序路径 文件全路径


CPP 举例
Protobuffer 编译:
"../grpc/core/bin/protoc.exe" -I "D:/Coding/Qt/BTSTester/tc/proto" --cpp_out="D:/Coding/Qt/BTSTester/tc/proto/" "D:/Coding/Qt/BTSTester/tc/proto/struct.proto"
GRPC 编译:
"../grpc/core/bin/protoc.exe" -I "D:/Coding/Qt/BTSTester/tc/proto" --proto_path="../grpc/core/include/google/protobuf" --plugin=protoc-gen-grpc="../grpc/core/bin/grpc_cpp_plugin.exe" --grpc_out="D:/Coding/Qt/BTSTester/tc/proto/" "D:/Coding/Qt/BTSTester/tc/proto/struct.proto"
 

 

上一篇:php使用grpc(windows环境下)


下一篇:CentOS8.3安装grpc