[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: shared module chain under linux
- From: Michal Kottman <k0mpjut0r@...>
- Date: Thu, 23 Feb 2012 22:46:01 +0100
On 23 February 2012 22:36, Roberto Ierusalimschy <firstname.lastname@example.org> wrote:
> It must be opened with '*' first. Lua keeps the result of the first
> 'dlopen' for a library and reuses it for other calls. But it may be
> a good idea to separate those auxiliary functions into a C library
> that has no Lua function (and no 'luaopen_' function), so it is never
This is what I was suspecting. First I wanted to bundle the "loader"
functions in the shared library itself, but finally I realized that
the only really working way is to have a pure shared library
(liblqt.so), and a "loader" Lua script - lqt.lua, which will handle
things like dependencies between modules. This way "require 'lqt'"
would still work as I imagined.