bug-libtool
[Top][All Lists]
Advanced

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

Re: lt_dlopenadvise ignores advice


From: Anton Ertl
Subject: Re: lt_dlopenadvise ignores advice
Date: Mon, 21 Apr 2008 21:17:20 +0200 (CEST)

Gary V. Vaughan wrote:
> You should be aware however, that opening libraries (as opposed
> to modules) is not entirely portable.  For example Mac OS X has
> foo.dylib for shared libraries that will be opened by the linker
> at run time, and foo.so for modules that are openable with dlopen()
> and equivalent.
> 
> On architectures with a runtime loader that can't handle dependent
> libraries (for example a math.so module that was linked with -lm),
> lt_dlopen() et. al. will portably open those dependency libraries
> (eg libm.so) provided you installed and open the appropriate .la
> file.
> 
> In other words, lt_dlopen("math.la") will automatically load libm.so
> on those hosts that require it without forcing you to write non-
> portable code.

Thanks for the advice.  So that means that the lt_dladvise_ext()
feature is not as useful as I had hoped; instead, I should do some
libtool invocation (which I have yet to find out) to generate a .la
file from the existing library, which I can then open.

Wouldn't it be a good idea if the lt_dladvise_ext() feature did that
automatically?

- anton




reply via email to

[Prev in Thread] Current Thread [Next in Thread]