[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua cygwin
- From: David Manura <dm.lua@...>
- Date: Sat, 2 Feb 2008 20:06:20 +0000 (UTC)
Wesley Smith writes:
> I'm trying to run Lua in cygwin but am
> getting some odd behavior. I've tried a few things:
> 1) make mingw
This is unrelated, but "make mingw" doesn't actually compile with MinGW under
Cygwin. That is, it doesn't pass the -mno-cygwin switch to GCC, so it won't
link to the native CRT. You can do this if you want that: "make CC='gcc
However, if you want to build Lua as a regular Cygwin application, I recommend
using "make linux" (if you have the readline package installed) of "make posix"
(if you don't have readline). This generates a liblua.a (instead of lua51.dll),
which you can copy into /usr/local/lib.
> 2) install dll in /usr/local/lib and lua.exe in /usr/local/bin
> When I run lua, nothing happens (no errors or anything)
lua51.dll would belong in /usr/local/bin. liblua.a would belong in
/usr/local/lib. The former is a Windows-ism and the latter is a Unix-ism.
Windows searches for DLLs using the Windows search mechanism (
http://msdn2.microsoft.com/en-us/library/ms682586(VS.85).aspx ), such as the
PATH environment variable. Unix searches for libraries using, for example,
LD_LIBRARY_PATH and /etc/ld.so.conf, which typically includes /usr/local/lib.
> Anyway, it seems to run scripts ok, but nothing gets printed to the
Check your CYGWIN environment variable: "echo $CYGWIN". If you have "tty" in
there ( http://www.cygwin.com/cygwin-ug-net/using-cygwinenv.html ), you probably
want to remove that, particularly if you want to run Lua as a native Windows
app. Otherwise, compile Lua as a Cygwin application.