lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Jun 6, 2010 at 6:22 AM, Eric Tetz wrote:
(1) I'm trying to statically link Luasocket into an app, and I'm
completely confounded by the module system. Does anyone know of an
open source project that statically links Luasocket to a Lua 5.1.x
that I could look at?

Scrupp [1] statically links LuaSocket. It's an application that embeds Lua, so it isn't a clean Lua interpreter.

(2) Assuming I can get past step 1, I'd like to be able to validate.
There doesn't appear to be any http tests in the Luasocket package,
and as far as I can tell the only sample app that use http (cddb)
doesn't work. When I run it (e.g. lua5.1.exe cddb.lua classical
270b8617) I get:

lua5.1.exe: cddb.lua:35: attempt to call field 'get' (a nil value)
stack traceback:
         cddb.lua:35: in main chunk

This example comes with Scrupp. Line 35 reads:

local body, code, headers = http.request(url)

This change should make it work.

Regards,
Andreas

[1] http://scrupp.sourceforge.net