一、 git下载sproto
https://github.com/cloudwu/sproto
二、编译
1、 去到 sproto 目录, 执行 make
如果出现如下报错
lsproto.c:881:12: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’LUAMOD_API int
- 打开:lsproto.c 修改 LUAMOD_API为LUALIB_API
编译成功后,会生成sproto.so库