[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lposix and lua on cygwin
- From: Keith Pimmel <keith.pimmel@...>
- Date: Mon, 25 Oct 2004 19:38:22 +0000 (UTC)
Greetings!
I'm playing around with lua, trying to convince myself that it is a tool that I
want to start using as my scripting language of choice for work and play. One of
the things I need is the ability to traverse directories, check for existance,
parse multiple files, ad naseum, and the lposix library module of lhf looks to
fit that to a tee.
My problem is that I'm a bit ignorant on compiling and linking. I modified the
included makefile to reflect back to my lua installation, and tried make. I
initially failed with a comment of
'_SC_STREAM_MAX' undeclared here (not in function)
My hack for that error was to arbitrarily #define _SC_STREAM_MAX to 100 for a
lack of a better value, since it is not defined in the unistd.h file shipped
with cygwin.
Typing make again generates the object file (lposix.o), but when it tries to
generate the shared object, I get a steady stream of error messages saying
things like:
lposix.o(.text+0x3ba):lposix.c: undefined reference to `_lua_type'
lposix.o(.text+0x3d1):lposix.c: undefined reference to `_luaL_checklstring'
lposix.o(.text+0x3dd):lposix.c: undefined reference to `_luaL_findstring'
lposix.o(.text+0x411):lposix.c: undefined reference to `_luaL_argerror'
lposix.o(.text+0x41d):lposix.c: undefined reference to `_lua_newtable'
lposix.o(.text+0x438):lposix.c: undefined reference to `_lua_pushstring'
lposix.o(.text+0x45a):lposix.c: undefined reference to `_lua_settable'
lposix.o(.text+0x48d):lposix.c: undefined reference to `_lua_pushstring'
lposix.o(.text+0x4cd):lposix.c: undefined reference to `_lua_pushstring'
lposix.o(.text+0x4d9):lposix.c: undefined reference to `_lua_pushstring'
lposix.o(.text+0x51d):lposix.c: undefined reference to `_lua_pushstring'
lposix.o(.text+0x52c):lposix.c: undefined reference to `_lua_pushnumber'
lposix.o(.text+0x566):lposix.c: undefined reference to `_lua_pushnil'
lposix.o(.text+0x591):lposix.c: undefined reference to `_lua_pushfstring'
lposix.o(.text+0x5a4):lposix.c: undefined reference to `_lua_pushnumber'
lposix.o(.text+0x5ce):lposix.c: undefined reference to `_lua_pushstring'
...(lather rinse repeat)
making it look like it isn't finding the libraries it needs. However, the -I
path is valid pointing to my lua distro include path. I'll be the first to claim
bleeding ignorance when compiling *nix-type stuff on cygwin; my question is does
this need to be converted into a compilation of a DLL and then go from there.
Another comment is that the -fPIC flag appears to be ignored if I am to believe
the output.
A more general question is has anyone ever compiled the lposix stuff on cygwin,
and if so, what steps did you have to take to do so?
Thanks for any insight.
Feel free to respond directly to me in addition to the list:
keith.pimmel@dynetics.com
yrs,
Keith