[C++-sig] Re: boost.build: How to set runtime library paths in a Jamfile (wrapping 3rd party libs)

Ingo Luetkebohle ingo at fargonauten.de
Thu Mar 11 16:55:08 CET 2004


Am Do, den 11.03.2004 schrieb David Abrahams um 16:41:
> Right.  Most people don't want absolute paths to libraries encoded in
> their objects.

While that might be so, it says nothing about ld's '-R' (or '-rpath' on
Linux) option.  That option prepends a directory to the run-time linker
search path.  There is no absolute path to a library, the library is
searched as usual, but in additional locations.

Most people I know prefer that to LD_LIBRARY_PATH very much ;-)

One reason is that it can be applied to a single shared object or
executable, instead of applying unconditionally to everything.  Like,
"for *this* library, look in '/usr/local/boost/lib' for additional
dependencies".  

Another pro is that it works with setuid binaries while LD_LIBRARY_PATH
usually does not, for obvious reasons.

While moving libraries is an issue, one can always re-link with a
different RPATH.  libtool does that, for example.

regards

-- 
Ingo

Soll doch jeder bleiben, wie er gerne wäre.






More information about the Cplusplus-sig mailing list