gcc -fpic -c -o LuaLIB.o LuaLIB.c -lFOREIGNLIB -Wall
gcc -O -shared -lFOREIGNLIB -fpic -o LuaLIB.so LuaLIB.o -lFOREIGNLIB
这给了我:
lua5.3: error loading module 'LuaLIB' from file './LuaLIB.so':
libFOREIGNLIB.so.1: cannot open shared object file: No such file or directory.
如何在为Lua编译C模块时使用/包含另一个库?