lua-users home
lua-l archive

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


Hey gang,

I've compiled lua5.1w6 on cygwin and have it up and running with no problems. When I issue in the interpreter the following:

print(loadlib())

I receive the error message:

stdin:1: bad argument #1 to 'loadlib' (string expected, got no value)
stack traceback: blah blah blah

When I did the same with 5.0.2 under cygwin, I get the following message:
nil      'loadlib' not supporeted absent

I take this to mean that I could load dynamic libraries under 5.1w6 but not 5.0.2. So I tried to build lfs and see if I could load it using the following statements in 5.1w6:

path = '/home/Pimmel/luafilesystem-1.0/lfs.1.0.dll'
f = assert(loadlib(path,'luaopen_lfs'))

whereupon I get the following error message:
stdin:1: 'loadlib' not supported

Casually looking through the source code in loadlib.c, I didn't really see a case that covers cygwin (i.e., Windows binaries, but it doesn't seem to define _WIN32, which is what defines LUA_DL_DLL in luaconf.h).

I guess what I'm asking, after introducing all that noise above, is has anyone ever done dynamic library loading in cygwin, and what did they do to do it, as I'm not having a ton of success.

I looked at Mike Pall's page on the Wiki, and while I linked against a static lua51.a library instead of a lua51.dll, I think I did everything I was supposed to. (http://lua-users.org/wiki/BuildingModules)

Any help is greatly appreciated.

Keith
--
Keith Pimmel     ~~~~     Dynetics, Inc.     ~~~~     256.964.4717