Closed CatCodeMe closed 4 years ago
根据知乎中文说明,编写的aa.lua
使用gcc安装已成功
Lua不同大版本二进制是不兼容的
大佬,我发现原因了。
luarocks install lua-protobuf
安装时,
/usr/local/share/lua/5.1/
生成 protoc.lua
源文件/usr/local/lib/lua/5.1/
生成 pb.so
源文件pb.so
会报错,
./pb.so: undefined symbol: lua_tointegerx
, 这个好像就是因为lua版本的问题gcc -O2 xxxxxx
手动编译生成 pb.so
文件,此时引用不会有问题
encode
,decode
,没有遇到问题pb.so
文件的md5,竟然不一样。所以我怀疑是不是luarock的锅。你luarocks使用的lua可能和系统安装的不一样,你查询一下luarocks(应该有类似info的命令)使用的Lua到底是装在哪儿的
issue