5月 242018
 

使用protocol buffers提供的工具protoc进行编译,将proto文件生成相关的java和c++文件,命令行大致如下:

~/下载/protoc-3.2.0-linux-x86_64/bin/protoc –plugin=protoc-gen-grpc-java=/media/win150g/document/grpc/grpc-java/compiler/build/exe/java_plugin/protoc-gen-grpc-java –grpc-java_out=lite:/media/win150g/document/grpc/GrpcTestApp/app/src/main/java –plugin=protoc-gen-grpc-cpp=/media/win150g/document/grpc/grpc-cpp/grpc/bins/opt/grpc_cpp_plugin –grpc-cpp_out=./ –cpp_out=./  –java_out=/media/win150g/document/grpc/GrpcTestApp/app/src/main/java test.proto

各参数说明:

相关链接:

各种开发工具的plugin附件

grpc_ruby_plugin grpc_python_plugin grpc_php_plugin grpc_objective_c_plugin grpc_csharp_plugin  protoc-gen-grpc-java grpc_cpp_plugin

打赏
 Posted by on 2018-05-24

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

* Copy This Password *

* Type Or Paste Password Here *

12,615迄今阻止垃圾评论Spam Free Wordpress