lua-users home
lua-l archive

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

> I might be talking nonsense here (I'm also dealing with
> multi-platform dll/so/dylib issues occasionally), but shouldn't
> somehow directly refer, or has implicit dynamic linking to
> Wouldn't be worse if use GLOBAL, then you can't have the same symbol
> exported by two different shared libs (and that's okay for most of
> the cases, but how would plugins work, usually they have one entry
> point, and most of the time it's the same symbol name)?

In 5.2, the function package.loadlib has an aditional parameter that
corresponds to this GLOBAL option. 'require' still links modules with
private names. If you want to link a C library to use its functions
directly from another C library, then you should load the library using
package;loadlib plus that option (instead of using require).

-- Roberto