protobuf for lua in Mac

protobuf version 2.5

lua version 5.1.5

protoc-gen-lua Download:  http://protoc-gen-lua.googlecode.com/archive/e32bde08c3e8f7b6eb6e09d0d6b0d8c189302ecd.zip

  1. Compile protobuf: INSTALL.txt installation according protoc last generated in / usr / local / bin
  2. Modify protoc-gen-lua / pb.c file in Protobuf (refer to Part protoc-gen-lua compiled dll)
  3. Compile protoc-gen-lua: Modify the Makefile lua5.1 as lua, and finally make a pb.so file
  4. The soft links ln -s path / plugin in / usr / local / bin / protoc-gen-lua protoc-gen-lua
  5. Protoc --lua_out performed in example =. / Person.proto
  6. Run lua test.lua output

Reproduced in: https: //www.cnblogs.com/moonbear/p/3558154.html

Guess you like

Origin blog.csdn.net/weixin_33888907/article/details/94500051