我在嵌入式系统上使用lua。我为我的设备和其他库交叉编译了lua解释器。
require('test')
print('script')
Ouptut:
从文件'./test.so'加载模块'test'出错: 未启用动态库;检查您的Lua安装
我如何安装lua ::::
交叉编译:
arvindpanwar@arvindpanwar-Latitude-E5450:~/code/lua-5.3.3$ PATH=$PATH:~/.glibc-oabi-toolchain-arm-generic/bin LD_LIBRARY_PATH=~/.glibc-oabi-toolchain-arm-generic/lib make CC=arm-linux-gcc CFLAGS='-I/home/arvindpanwar/.sdk/include -DLUA_USE_LINUX' LDFLAGS='-L/home/arvindpanwar/.sdk/lib -lcurses' linux INSTALL_TOP=~/.sdk
arvindpanwar@arvindpanwar-Latitude-E5450:~/code/lua-5.3.3$ PATH=$PATH:~/.glibc-oabi-toolchain-arm-generic/bin LD_LIBRARY_PATH=~/.glibc-oabi-toolchain-arm-generic/lib make install CC=arm-linux-gcc CFLAGS='-I/home/arvindpanwar/.sdk/include -DLUA_USE_LINUX' LDFLAGS='-L/home/arvindpanwar/.sdk/lib -lcurses' linux INSTALL_TOP=~/.sdk