Lua编译链接错误

Que*_*ERC 1 linker lua compiler-errors

当我尝试编译一个小的lua程序时,我得到这些错误:

/usr/lib//liblua52.so: undefined reference to `dlsym'
/usr/lib//liblua52.so: undefined reference to `dlerror'
/usr/lib//liblua52.so: undefined reference to `dlopen'
/usr/lib//liblua52.so: undefined reference to `dlclose'
Run Code Online (Sandbox Code Playgroud)

当然,我用-ldl链接.我在我的ubuntu上安装了lua5.2-dev.如果您需要更多信息,请问我.

谢谢!

Emp*_*ian 5

当我尝试编译一个小的lua程序时,我得到了这些错误

不.链接程序时会出现这些错误.

修复是-ldl在链接行的末尾添加.