lua-users home
lua-l archive

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


I'm trying to setup Lua to work in Cygwin (not natively in Windows). I downloaded Lua 5.1.3 and built/installed it using "make linux." I can run the interpreter without any problems. However, I'm having trouble building/installing any of the common Lua libraries. I started with LuaSocket, but LuaFileSystem and others seem to have the same problem.  I initially tried to do this using Luarocks without success. I don't think it's a Luarocks issue as trying to build the libraries directly results in the same problem.

For example, when trying to built LuaSocket 2.0.2 with gcc 3.4.4, I get the following:

cd src; make all
make[1]: Entering directory `/home/nels/lua/luasocket-2.0.2/src'
gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic   -c -o luasocket.o luasocket.c
-- [snip - more *.o]
gcc  -O -shared -fpic -o socket.so.2.0.2 luasocket.o timeout.o buffer.o io.o auxiliar.o options.o inet.o tcp.o udp.o except.o select.o usocket.o
make[1]: Leaving directory `/home/nels/lua/luasocket-2.0.2/src'

luasocket.c:1: warning: -fpic ignored for target (all code is position independent)
-- [snip - same for *.c]
luasocket.o:luasocket.c:(.text+0x1c): undefined reference to `_luaL_checkinteger'
luasocket.o:luasocket.c:(.text+0x26): undefined reference to `_lua_gettop'
-- [snip - more undefined reference errors in *.o]
collect2: ld returned 1 exit status
make[1]: *** [socket.so.2.0.2] Error 1
make: *** [all] Error 2

I somewhat inexperienced with more complicated builds in Cygwin and quite new to Lua, so any help would be appreciated. Thanks!

-Nels