简体   繁体   English

Lua C 编译 -llua 错误

[英]Lua C Compiling -llua Error

I am attempting to compile some C code to run with Lua through the command:我正在尝试编译一些 C 代码以通过以下命令与 Lua 一起运行:

gcc -o first first.c -llua -lm

and the output I receive:和我收到的输出:

ld: library not found for -llua
clang: error: linker command failed with exit code 1

I have also tried:我也试过:

-llua53
-llua5.3

But it still provides the same error.但它仍然提供相同的错误。 Would anyone be able to lead me to find out what library I need to provide with compiling, and where it's located?有没有人能够引导我找出编译时需要提供的库以及它的位置?

Please check the name of the static library file.请检查静态库文件的名称。 eg if it is called liblua.a the linker cannot find the llua library.例如,如果它被称为liblua.a则链接器找不到llua库。

I simply renamed the file liblua.a to 'llua.a'.我只是将文件liblua.a重命名为“llua.a”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM