[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Behavior of dlopen in MacOSX
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Jan 2012 22:32:07 -0200
> So maybe in MacOSX It should be always RTLD_GLOBAL.
Or maybe you should use 'loadlib' instead of 'require'. The documentation
of 'loadlib' explicitly states:
If funcname is "*", then it only links with the library, making the
symbols exported by the library available to other dynamically linked
libraries.
So, 'loadlib' does (or should do) exactly what you want. With 'require'
you are assuming an undocumented side effect that may have other
consequences (e.g., name conflicts across required libraries).
-- Roberto