lua-users home
lua-l archive

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


Mark Edgar wrote:

For a Cygwin-targeted build, ''make posix'' or ''make
linux'' both seem to work just fine.

"make linux" gives me:

gcc -o lua  lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/usr/local/src/lua-5.1.2/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/local/src/lua-5.1.2/src'
make: *** [linux] Error 2

I am not a Cygwin expert, but judging from the following
posts, this is expected behavior because Cygwin doesn't have
libdl (and doesn't need it because dynamic linking is baked
right in):

 http://www.cygwin.com/ml/cygwin/2006-07/msg00696.html
 http://www.cygwin.com/ml/cygwin/2003-07/msg00731.html
 http://www.cygwin.com/ml/cygwin/2003-07/msg00732.html

This target works for me:

cygwin:
       $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" \
       MYLIBS="-Wl,-E -lreadline -lhistory"

(And I think package.loadlib still works.)

--
Aaron
http://arundelo.com