Building lua on windows

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Building lua on windows

Tom Wieland
Hello.

I am interested in building lua and libraries lfs, wsapi, cosmo, orbit
and maybe others later myself on windows. Is there a page describing
what I need and how to do it? Also, can this be done using open source
or otherwise free to use tools?
Reply | Threaded
Open this post in threaded view
|

Re: Building lua on windows

Alexander Sorockin
On Thu, 18 Feb 2010 22:06:08 +0300, Tom <[hidden email]> wrote:

> Hello.
>
> I am interested in building lua and libraries lfs, wsapi, cosmo, orbit
> and maybe others later myself on windows. Is there a page describing
> what I need and how to do it? Also, can this be done using open source
> or otherwise free to use tools?

http://luaforwindows.luaforge.net/

Reply | Threaded
Open this post in threaded view
|

Re: Building lua on windows

Fabio Mascarenhas
In reply to this post by Tom Wieland
Lua for Windows (http://luaforwindows.luaforge.net/) already has the Lua interpreter and several Lua modules. Last month I have also built a version of LuaRocks that can work with LfW so you can install new packages and upgrade the ones that you already have. See this message on the LuaRocks mailing list:


To compile C modules from source you are going to need the Windows Platform SDK, and the process is a little involved.

I added mingw support for LuaRocks, but the mingw .lib file for the version of MSVCRT that Lua for Windows uses is a little flaky, and some Lua libraries fail to compile, so using the (free as in beer) MSVC is still your best bet.

I am sure the heavier Windows users are going to chime in with suggestions, too. :-)

--
Fabio Mascarenhas


On Thu, Feb 18, 2010 at 5:06 PM, Tom <[hidden email]> wrote:
Hello.

I am interested in building lua and libraries lfs, wsapi, cosmo, orbit
and maybe others later myself on windows. Is there a page describing
what I need and how to do it? Also, can this be done using open source
or otherwise free to use tools?

Reply | Threaded
Open this post in threaded view
|

Re: Building lua on windows

Matthias Kluwe
In reply to this post by Tom Wieland
Hi!

2010/2/18 Tom <[hidden email]>:

> I am interested in building lua and libraries lfs, wsapi, cosmo, orbit
> and maybe others later myself on windows. Is there a page describing
> what I need and how to do it? Also, can this be done using open source
> or otherwise free to use tools?

Basically, take a look at http://lua-users.org/wiki/BuildingLua and
Chapter 1 of "Beginning Lua Programming" available by a link on this
page.

Regards,
Matthias
Reply | Threaded
Open this post in threaded view
|

Re: Building lua on windows

Peter Drahoš
In reply to this post by Tom Wieland

On Feb 18, 2010, at 8:06 PM, Tom wrote:

> Hello.
>
> I am interested in building lua and libraries lfs, wsapi, cosmo, orbit
> and maybe others later myself on windows. Is there a page describing
> what I need and how to do it? Also, can this be done using open source
> or otherwise free to use tools?

You might try LuaDist[1] too. Uses only open source tools.

pd.

[1] http://luadist.org/Documentation/Install 
Reply | Threaded
Open this post in threaded view
|

Re: Building lua on windows

steve donovan
In reply to this post by Fabio Mascarenhas
On Thu, Feb 18, 2010 at 9:20 PM, Fabio Mascarenhas <[hidden email]> wrote:
> http://lists.luaforge.net/pipermail/luarocks-developers/2010-January/001408.html
> To compile C modules from source you are going to need the Windows Platform
> SDK, and the process is a little involved.

A good GCC version for Windows is the TDM mingw builds:

http://www.tdragon.net/recentgcc/

> I added mingw support for LuaRocks, but the mingw .lib file for the version
> of MSVCRT that Lua for Windows uses is a little flaky, and some Lua
> libraries fail to compile, so using the (free as in beer) MSVC is still your
> best bet.

In particular, luafilesystem.  If you build with gcc -lmsvcr80 then
some entry points are incorrectly named.

There is a hackish way to get around this, described in

http://lua-users.org/wiki/BuildingModules

(which BTW is an excellent resource)

(search for 'Using MinGW to build against LuaBinaries')

steve d.

PS. Ryan has been making noises about moving Lua for Windows to a mingw platform