【问题标题】:How to make a makefile for lua 5.1.5 on windows or get LuaSocket for lua 5.3.5?如何在 Windows 上为 lua 5.1.5 制作 makefile 或为 lua 5.3.5 获取 LuaSocket?
【发布时间】:2020-02-19 06:49:02
【问题描述】:

我正在尝试使用 lua 制作一个简单的服务器到客户端的通信以获取乐趣。我发现唯一能够做到这一点的库是 luasocket,但它仅适用于 lua 5.1,而且我似乎找不到任何关于如何在 Windows 上为 5.1.5 构建 makefile 的明确说明。

我目前正在使用 Windows 10,并且我已经查看了所有地方,但我对这个世界是全新的,我不明白我所看到的大部分内容是什么意思。我已经尝试遵循本指南 (http://lua-users.org/wiki/BuildingLuaInWindowsForNewbies),但它适用于 lua 5.3,其 makefile.cmd 脚本仅支持该版本,并且在尝试使用 lua 5.1 时失败

我在编译时遇到的错误是...

F:\gcc-lua-install\lua-5.1.5\src\*.exe
The system cannot find the file specified.
        0 file(s) copied.
F:\gcc-lua-install\lua-5.1.5\src\*.dll
The system cannot find the file specified.
        0 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
The system cannot find the file specified.

**** BINARY DISTRIBUTION BUILT ****

'F:\gcc-lua-install\lua\bin\lua.exe' is not recognized as an internal or external command,
operable program or batch file.

【问题讨论】:

  • Luajit 可以使用一些较新的标准功能和 64 位指针进行编译,并且性能要好得多。您可以使用 ffi 调用 C 语言中的套接字函数。

标签: lua luasocket


【解决方案1】:

你可以从 www.lua.org 获取 Lua

Binaries

https://sourceforge.net/projects/luabinaries/files/5.1.5/

Sources

https://www.lua.org/ftp/lua-5.1.5.tar.gz

为 Lua 5.3 构建 luasocket 也应该很简单。网上有多种资源可以解释如何做。

此类琐碎问题请使用网络搜索。

【讨论】:

  • 看来我的问题还不清楚,我在让 makefile 在 Windows 上为它工作时遇到了很多麻烦,我找不到明确的解释。我对问题进行了编辑,使其更加连贯。
  • @Stratiz 有点不清楚?您将问题更改为完全不同的问题。你问在哪里可以找到它,现在你想知道如何构建它。你欠我 5 分钟的生命。
  • 你能回答我的问题吗?如果没有,我很感激你的时间。
猜你喜欢
  • 2019-03-09
  • 2012-04-02
  • 2013-09-10
  • 2016-01-09
  • 1970-01-01
  • 2019-10-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多