protoc专题提供protoc的最新资讯内容,帮你更好的了解protoc。
首先我们需要的protobuf导出lua的工具https://github.com/sean-lin/protoc-gen-lua, 具体使用,编写自己的proto文件,使用protoc --lua_out=./ foo.proto 导出lua文件即可,导出lua文件的主要实现是在plugin下的protoc-gen-lua文件。本身此工具不支持proto的嵌套,比如有两个proto文件 basi
我们项目中的Protobuf 是这样的格式 --Student.proto message Student { required int32 id = 1; extensions 10 to max; } message Phone { required string phonenum
比如我这里创建一个 Student.proto --Student.proto message Info { required string name=1; } message Student { required int32 count=1; repeated Info infos=2; } 在
在使用protoc-gen-lua 生成的lua文件时提示错误: main function has more than 200 local variables 意思就是说,这个lua 脚本中的 local 变量超过了 200个,不知是不是lua的限定还是 Protobuf 的限定。总之很奇妙。 到StackOverFlow上面搜索到相关的问题,很多朋友表示把 local 变量装在Table中可以
自从用了 protoc-gen-lua 之后,就有了各种各样的问题。之前总结了一些 注意事项 protoc-gen-lua extensions正确的使用方式 Unity中使用SLua的一些注意事项 比如 : 对于proto-lua-gen 如果一个message 中有一个 extensions ,但是这个 extensions是一个空的 message 像下面 --Student.protp
protoc-gen-lua 生成 lua 文件的时候,不能跨文件引用 message 。 原因如下图 即使是相同的 文件中的两个message,如果proto文件中加入了 package 标签,也不能引用。 原因如下图,生成的是 messagetype是  _SEX ,但是实际上是 SEX,去除 _ 即可
所需文件安装包: python-2.7.2.msi python安装程序                           http://www.python.org/getit/ LuaForWindows_v5.1.4-45.exe lfw安装程序                                http://code.google.com/p/luaforwindows/do
原文地址:http://blog.csdn.net/huutu/article/details/49672225 Protobuf 官方并没有 Lua版本,然后网易的程序猿开发出了 protoc-gen-lua ,可以让我们将 Proto 文件转成 lua 脚本在 Lua中使用,下面是详细的编译、安装、使用教程。文中用到的代码、工具都有百度网盘下载。 本文转自http://blog.csdn.ne