这将生成消息结构所需的 cpp 文件
protoc.exe -I=. --cpp_out=. .\helloworld.proto
报错:
–proto_path passed empty directory name. (Use “.” for current directory.)
解决:
protoc.exe --cpp_out=. .\helloworld.proto
此命令将生成服务接口所需的 cpp 文件
protoc.exe --grpc_out=. --plugin=protoc-gen-grpc=grpc_cpp_plugin.exe helloworld.proto