[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: win32 programmer, linux newb needs help: lua/luasql
- From: "Thomas Blom" <thomasblom@...>
- Date: Tue, 22 Aug 2006 14:56:23 -0500
Ok, so I then pull the latest luasql source, and examining the make it
appears to want compat-5.1. So I pull that also, and after messing with
the config directories a bit, get it to compile. I also run 'make
install' after editing the config thusly (attempting to use lua 5.1):
compat is needed to use lua50 with the behavior of lua51. compat is not
to be used with lua51.
If I edit the luasql Makefile to remove the compat-5.1 object file from
OBJS, and rebuild,
I get the following runtime error when executing the test.lua under lua
lua: error loading module 'luasql.mysql' from file
/usr/local/lib/lua/5.1/luasql/mysql.so: undefined symbol:
[C]: in function 'require'
test.lua:599: in main chunk
I'm guessing that the undefined symbol is defined in the 5.1 version of
liblua, and it is not in 5.0 (but is provided via the compat-5.1 library).
When I run lua as above, I am running the 5.1.1 version I built - and it
was statically linked to liblua.a. I don't really understand how mysql.so
is meant to dynmically link to whatever library contains luaL_module - how
is that library specified? The makefile only gives a LIB_OPTION of
"-shared". It doesn't specify liblua.so, for example, anywhere.
A further source of confusion to my win32 trained brain: why is the
undefined symbol not caught at compile time? Is there no equivalent of
"import libraries" that one can link against to ensure symbols we're
expecting to find in a shared library are in fact available? (and that
tell us which shared libraries to load on execution)
Finally, what tool can I use to look at which shared libraries a program
has opened (and where they were loaded from?)
thanks for all help,
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/