Open legends2k opened 8 years ago
To build fltk4lua
on Lua 5.3 on mingw, I had to edit /mingw/share/lua/5.3/luarocks/build/cpp.lua
as follows after installing the rock.
Comment out the module(...)
line at the top
Function luarocks.build.build_rockspec
calls
pcall(require, "luarocks.build." .. build_spec.type)
, so we are going to
change luarocks.build.cpp
to a new-style module. That involves two
changes:
Add just after the module
line:
local M = {}
Add at the very end of the file:
return M
Now change the definition of the exported function to be a member of M
.
Change:
function run(rockspec)
to:
M.run = function(rockspec)
Replace all instances of unpack
with table.unpack
(there were 9,
when I did this)
The rock
fltk4lua
depends onluarocks-build-cpp
for building the rock. Tryinggives the error
The Lua interpreter I've is version 5.3; this doesn't have the function
module
defined in the standard library like 5.1 did. Lua 5.2 deprecatedmodule
.