栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

Protobuf编译cmd命令

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Protobuf编译cmd命令

可以通过cmd命令来编译生成proto文件对应的编程语言的脚本

【注意没配置环境的】在编译软件protoc.exe的文件夹下打开cmd进行编辑命令输入

命令如下:

protoc.exe --java_out=编译完成后脚本所放置的文件夹路径 proto文件的全路径 --proto_path=proto文件所在文件夹的路径

例如

我要编译的proto文件的路径是D:nettyprotosData.proto

我想把他编译后生成的脚本放到D:nettymyScripts 下

就这种写:

protoc.exe --java_out=D:nettymyScripts D:nettyprotosData.proto --proto_path=D:nettyprotos

如果你proto文件不想编译成java脚本,就把上面命令里面的--java_out换成你想要的

you can provide one or more output directives:

  • --cpp_out generates C++ code in DST_DIR. See the C++ generated code reference for more.
  • --java_out generates Java code in DST_DIR. See the Java generated code reference for more.
  • --kotlin_out generates additional Kotlin code in DST_DIR. See the Kotlin generated code reference for more.
  • --python_out generates Python code in DST_DIR. See the Python generated code reference for more.
  • --go_out generates Go code in DST_DIR. See the Go generated code reference for more.
  • --ruby_out generates Ruby code in DST_DIR. See the Ruby generated code reference for more.
  • --objc_out generates Objective-C code in DST_DIR. See the Objective-C generated code reference for more.
  • --csharp_out generates C# code in DST_DIR. See the C# generated code reference for more.
  • --php_out generates PHP code in DST_DIR. See the PHP generated code reference for more.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1010226.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号