|
Dlopening documentation: msg#00013gnu.libtool.general
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The current libtool docs say: @node Finding the dlname @section Finding the correct name to dlopen @cindex names of dynamic modules @cindex dynamic modules, names After a library has been linked with @samp{-module}, it can be dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. The most straightforward and flexible implementation is to determine the name at runtime, by finding the installed @samp{.la} file, and searching it for the following lines: @example # The name that we can @code{dlopen}. dlname='@var{dlname}' @end example If @var{dlname} is empty, then the library cannot be dlopened. Otherwise, it gives the dlname of the library. So, if the library was installed as @file{/usr/local/lib/libhello.la}, and the @var{dlname} was @file{libhello.so.3}, then @file{/usr/local/lib/libhello.so.3} should be dlopened. If your program uses this approach, then it should search the directories listed in the @code{LD_LIBRARY_PATH}@footnote{@code{LIBPATH} on AIX, and @code{SHLIB_PATH} on HP-UX.} environment variable, as well as the directory where libraries will eventually be installed. Searching this variable (or equivalent) will guarantee that your program can find its dlopened modules, even before installation, provided you have linked them using libtool. I have a feeling that this is all done automatically by lt_dlopen. If it isn't then it should be... Comments? Cheers, Gary. - -- Gary V. Vaughan ())_. gary@{lilith.warpmail.net,gnu.org} Research Scientist ( '/ http://www.oranda.demon.co.uk GNU Hacker / )= http://www.gnu.org/software/libtool Technical Author `(_~)_ http://sources.redhat.com/autobook -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAR3V7FRMICSmD1gYRApgGAKCCjCTkoUnNNFAUWcWnasuSuV5emQCeNMJk szxgxoSil/N4ZUWQQi6vebY= =FzWl -----END PGP SIGNATURE----- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Get cheap via-gra: 00013, Goldie T. Polk |
|---|---|
| Next by Date: | Re: IFACMGN, out of dough: 00013, Lucile Watson |
| Previous by Thread: | Crosscompiling again...i: 00013, Tietz Fabian (AA/ESW1) |
| Next by Thread: | Re: Dlopening documentation: 00013, Albert Chin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |