我正在尝试编译luasocket 3我在 GitHub 上找到的lua 5.2。问题是,我不知道如何绑定在一起Lua
with luasocket
。我需要编译吗luasocket
作为 DLL,然后引用lua
代码,或者我应该从 lua 控制台调用它?
尝试使用安装它luarocks。如果您没有 luarocks,请按照网站上的说明进行安装。
然后从 luasocket repo 下载 rockspec 文件(luasocket-scm-0.rockspec)并运行
$ luarocks install *path to the rockspec file*
如果一切顺利,您将能够像这样使用 Lua 中的 luasocket:
local socket = require "socket"
-- now you can use socket.xxx functions
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)