【问题标题】:How to compile LuaFileSystem library and get .dll file WITHOUT luarocks?如何在没有 luarocks 的情况下编译 LuaFileSystem 库并获取 .dll 文件?
【发布时间】:2014-10-25 12:37:23
【问题描述】:

所以,我得到了文件“lfs.c”“lfs.h”“lfs.def”和“.gitignore”。我尝试安装 MinGW 并输入该命令:gcc lfs.c(请记住,我是此类事情的新手),这让我出现错误“未能包含 lua.h”......我不知道怎么做,谁能给我解释一下怎么做?或者至少给我已经编译好的 lfs.dll 的链接?

【问题讨论】:

  • 编译不仅仅是调用gcc。检查 LFS 是否包含 configure 脚本,如果包含,运行它,然后运行 ​​make。此外,您需要将 Lua 的头文件和库添加到适当的位置。

标签: c dll lua luafilesystem


【解决方案1】:

您可能缺少 Lua 包含文件;有关如何设置的详细信息,请参阅this SO answer

简单地获取 lfs.dll 可能并不那么容易,因为不同的 DLL 可能依赖于 Windows 上不同的 Lua DLL。我有针对 Lua51.dll 编译的 lfs.dll,所以如果这适合您的项目/需求,您可以get a compiled version here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-03-25
    • 1970-01-01
    • 1970-01-01
    • 2011-09-27
    • 2013-07-16
    • 1970-01-01
    • 2012-09-03
    相关资源
    最近更新 更多