Building the libraries for Lua for Windows

123 views
Skip to first unread message

Marc Assin

unread,
Oct 7, 2015, 12:37:16 PM10/7/15
to luaforwindows
Hi,

I've much appreciated the excellent tutorial
.... worked first time :-)

This tuto is for building LUA itself, I wonder if there is a similar tuto for building the libraries for Lua for Windows.
I've tried to adapt the above example for libraries, but ended up nowhere.

Thanks in advance for any help.

Raymond

Andrew Wilson

unread,
Oct 7, 2015, 2:02:23 PM10/7/15
to luafor...@googlegroups.com
Hi Raymond, 

Each lua library is different and no general instructions cover all libraries. But another project LuaDist http://luadist.org/ answers how to build whole Lua ecosystem including libraries. Unfortunatlely LfW is evolutionary dead end. Also ZeroBrane http://studio.zerobrane.com/ is a good complete environment. 

 Regards 
Andrew Wilson

--
You received this message because you are subscribed to the Google Groups "luaforwindows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luaforwindow...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Pusztai

unread,
Oct 7, 2015, 3:12:13 PM10/7/15
to luafor...@googlegroups.com
Well I can tell you the compiler and some settings to add.

Lua for Windows:
  *  "LUA_DEV" environment variable that can be used in makefiles and vcprojects.
  * Visual Studio 2005 (hard to get these days, but that was what most of these modules were built using

For you build setup set the include_dir to '{{LUA_DEV}}/include' and library_dir to '{{LUA_DEV}}/lib'

Hope this helps


--
Regards,
Ryan

On Wed, Oct 7, 2015 at 12:37 PM, Marc Assin <zigo...@gmail.com> wrote:

--

Thijs Schreijer

unread,
Oct 7, 2015, 4:24:20 PM10/7/15
to luafor...@googlegroups.com

Some more links that might be useful. Assuming you mean to use Lua in general on Windows, and not specifically the “Lua for Windows” project binaries.

 

Installing Lua, a compiler and LuaRocks on windows; http://www.thijsschreijer.nl/blog/?p=863

 

A newer project (from after writing the post mentioned above) specifically for building Lua on windows; https://github.com/Tieske/luawinmake

 

Hth.

 

Thijs

 

--

Marc Assin

unread,
Oct 8, 2015, 12:20:33 PM10/8/15
to luafor...@googlegroups.com
Well, quite some reading.
Thanks a lot for all replies, much appreciated.
I've still a question (maybe a dumb question), is there any of the distributions mentionned above, more suitable for socket libraries. 
My main interest is indeed in sockets and communiction, included mail send & receive, ftp, http and https (luasec maybe)
Sorry to be picky, but I've already lost sooo much time exploring dead-end, that now I'd like to start something concrete, hence choosing the right stuff is very important.

@Andrew Wilson
> Each lua library is different and no general instructions cover all libraries
OK, lesson learned


@Thijs Schreijer
> Assuming you mean to use Lua in general on Windows, and not specifically the “Lua for Windows” project binaries.
Well .... (embarassed) I didn't notice the difference until you mentionned it.

Thanks for your kind help

Raymond

Thijs Schreijer

unread,
Oct 8, 2015, 12:42:12 PM10/8/15
to luafor...@googlegroups.com

Basically there are 2 (relatively) easy ways to use Lua in an environment with most stuff being done for you; LuaDist and LuaRocks.

 

The difference being that LuaDist uses cmake as build tool, and as such the LuaDist project keeps track of all cmake configurations for supported libraries (if you don’t know cmake and require a library not in LuaDist you might be depending on others to get what you want). With external libraries (OpenSSL for example) LuaDist is easier to use.

With LuaRocks every module author is responsible of publishing his own module (see luarocks.org). The format is a bit easier to tinker with, but here not all modules are supported on all platforms (especially unix libs not compatible with Windows). With external libraries you need to compile the base library yourself, as LuaRocks only builds the binding)

 

(the above is my view… so probably others think differently)

 

For starters both will serve you fine. For help, turn to the Lua mailing list, or alternatively here.

 

Thijs

 

--

Marc Assin

unread,
Oct 8, 2015, 4:06:18 PM10/8/15
to luafor...@googlegroups.com
Hi Thijs,

Thank you for this clear cut explanation.

Raymond
Reply all
Reply to author
Forward
0 new messages