Closed BennyTian closed 1 year ago
在作者的解答下,找到问题:
openresty 的 luajit 版本 和 luarocks 依赖的 lua 版本不一致.
修改编译方法,不使用 luarocks , 而是使用 gcc手动编译,手动指定lua的c库为openresty luajit 下的库文件:
gcc -O2 -I /opt/homebrew/opt/openresty/luajit/include/luajit-2.1 -shared -undefined dynamic_lookup pb.c -o pb.so
os: Mac m1
install:
cp pb.so pb.o protoc.lua $MYPATH/openresty/lualib
test.lua:
execption: