Re: loadlib: dlopen mode
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: loadlib: dlopen mode
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2004年9月24日 08:30:53 -0300
> Of course both is lua library. Just library "B" uses functions from
> library "A".
Do you mean, B uses C functions from A, not Lua functions exported by A?
In general, Lua libraries contain just one public symbol, their open function,
named by convention luaopen_xxx. This functions makes whatever services
the library provides available to Lua -- exporting C functions to other C
modules is not generally done. (It can be done but you'll have to take care
of interdependencies and probably use RTLD_GLOBAL as well, which seems not to
exist in all dlopen implementations.)
So, in your case, does B call luaopen_A or what?
I don't think RTLD_LAZY is a bad thing, only that RTLD_NOW seems more
convenient for Lua libraries. Perhaps you could explain what you're trying to
achieve with RTLD_LAZY.
--lhf