• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Windows Best way to install and develop in lua on windows 10 (1 Viewer)

deb75

Newcomer
Joined
May 23, 2021
Messages
2
Reaction score
0
Hello,

I am struggling to install a working environment in lua on windows.

Currently, I chose to install msys2/mingw64 system because it includes lua 5.4 and
because of the development tool chain which should make easy to install lua packages
through luarocks.

Alas, luarocks (provided by mingw64) does not seem to be working, it fails with strange errors.

I installed luarocks from the original site. I do not have previous errors, but it is difficult to configure, here is mine :

Code:
rocks_trees = {
    home..[[/luarocks]],
    { name = [[user]],
         root    = home..[[/luarocks]],
    },
    { name = [[system]],
         root    = [[d:\xxx\Documents\utils\luarocks-3.7.0\systree]],
    },
}
variables = {
    MSVCRT = 'm',   -- make MinGW use MSVCRT.DLL as runtime
    LUALIB = 'liblua.dll.a',
    LUA_DIR = [[D:\xxx\Documents\utils\msys64\mingw64]],
    LUA_BINDIR = [[D:\xxx\Documents\utils\msys64\mingw64\bin]],
    LUA_INCDIR = [[D:\xxx\Documents\utils\msys64\mingw64\include]],
    LUA_LIBDIR = [[D:\xxx\Documents\utils\msys64\mingw64\bin]],
    CC = [[D:\xxx\Documents\utils\msys64\mingw64\bin\gcc.exe]],
    MAKE = [[D:\xxx\Documents\utils\msys64\mingw64\bin\djvumake.exe]],
    RC = [[D:\xxx\Documents\utils\msys64\mingw64\bin\windres.exe]],
    LD = [[D:\xxx\Documents\utils\msys64\mingw64\bin\gcc.exe]],
    AR = [[D:\xxx\Documents\utils\msys64\mingw64\bin\ar.exe]],
    RANLIB = [[D:\xxx\Documents\utils\msys64\mingw64\bin\ranlib.exe]],
}

I am not sure of the LUALIB and LUA_LIBDIR variables : liblua.dll.a is
in D:\xxx\Documents\utils\msys64\mingw64\lib, not bin, but in bin there is
lua54.dll

If I set LUA_LIBDIR to D:\xxx\Documents\utils\msys64\mingw64\lib, luarocks outputs
an error saying that it does not find the path (!?)

Are my settings correct ?

Thanks in advance for your help

Regards
 

Arghtastic

Newcomer
Joined
Apr 26, 2021
Messages
3
Reaction score
0
So, I am not very good, but I found that Gitbash let me run luajit pretty well. As I had to make something to process a horrendously large flat file, the table structures in lua + luajit compiler made it a breeze to do a ton of fast in-memory processing.

I hope this helps or you have made process since your post.
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
32
Location
Victoria BC
Website
winlua.net
Hi,

Try downloading my Winlua installer? WinLua - Lua Plus Tools for Windows. LuaRocks is installed and set up to work with Lua 5.3. The installer takes care of the paths and whatnot.

It also comes with a C/C++ compiler that works mostly out of the box. The installer includes Lua 5.4, but you would have to copy and modify the luarocks 5.3 config file to get 5.4 working together with LuaRocks (5.4 is lightly tested).

I'm behind on my next release. llvm had a regression in the 12.0 release so I am waiting on the next release to re-package.

All feedback welcome.
 
Top