[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compiling Lua statically with luasocket and without loadlib
- From: Diego Nehab <diego@...>
- Date: Mon, 26 Dec 2005 17:49:28 -0500 (EST)
I'm trying to compile Lua on an AIX machine with luasocket statically
linked in, as I don't have dlopen there... but how do I convince the
module system that the ".so"s of luasocket are already loaded, and
what is the correct sequence of "require"s? The script that I am using
is below - I'm quite sure that I'm close to the solution, but my brain
You can use the package.preload table for this.
Make sure you add an entry package.preload["socket.core"], whose value
is the C function (use lua_pushcfunction) luaopen_socket_core.
Do the same with package.preload["mime.core"] and the function
luaopen_mime_core. When you call require(), it will not try to load the