lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:

After all, is there a consensus about the "correct"
way for Lua to load dynamic libraries in Mac OS X?
NSAddImage? NSCreateObjectFileImageFromFile?
A general loadlib request: Lua 5.1 has an OS-independent wrapper for DL calls. Since I'm in the process of integrating Bruno Haible's av_call into 5.1, I would need the Lua dl functions split up into the dl access and the symbol lookup part.

What I already had for Lua 4 was code to do the following
dl=dlopen("/usr/lib/libm.so")
ffcall(dl.sin, "dD", 3.14159) --
I'd like to be able to use the wrappers from Lua 5.1 to do the same, i.e. dlopen and the gettable metatable method for a dl object. I could modify the relevant pieces myself, but right now don't have a Mac nor a Windows box to test. Also, would like to clarify the design issues with you gentle folks in Rio...

-- Dolfi