【发布时间】: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 语言中的套接字函数。