lua-users home
lua-l archive

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


Hey gang,

Just when I thought I had it working, I ran into the following situation.

I've built Luafilesystem (lfs) as a shared object per my previous email.
The shared library is found at /usr/local/lib. My Lua installation is found at /home/root/lua-5.1-work6. Inside that directory, I have a directroy entitled scripts which contains the file lfs.lua, with the following contents:

local path = "/usr/local/lib/liblfs.1.0.so"
local f = assert(loadlib(path, "luaopen_lfs"))
local lfs = f()

I launch a Lua intrepreter, say from my home directory (/home/Pimmel). I check my LUA_PATH environment using os.getenv, yielding the following:

?;?.lua;/home/root/lua-5.1w6/scripts/?.lua

I try typing:
require"lfs"

...I get an error saying that lfs is not found. I know I'm doing something slightly braindead here, but I'm not hitting the solution by my random testing. If I execute within the /home/root/lua-5.1w6/scripts directory and use require"lfs", all is well and fine. Additionally, if I launch lua from /usr/local/lib and use require"lfs", all appears fine as well. Any insight is greatly appreciated.

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