lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:
It there any special ideas to use RTLD_NOW instead of RTLD_LAZY ?

So that when we return from loadlib at least we "know" the library is
compatible with the current Lua core.  I think Python does the same.

I tried to load two dependent  shared libraries and got an error.

You'll have to give more detail about the error.

Unresolved ....
Changing to RTLD_LAZY helps.

Keep in mind that loadlib is for loading Lua libraries, not arbitrary
libraries. In other words, the init function must be a Lua C function,
that is

	LUALIB_API int luaopen_xxx (lua_State *L)

Of course both is lua library. Just  library "B" uses functions from
library "A".

I.e library "A" could be loaded and used standalone, but library "B" could be used together with library "A" only.

Dmitry Samersoff,
ICQ: 3161705
* There will come soft rains ...