使用另一个“外部”库编译Lua C模块

时间:2017-09-04 20:21:45

标签: c gcc module lua shared-libraries

 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模块时使用/包含另一个库?

0 个答案:

没有答案