From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-06 02:15:05
Larry Evans wrote:
> As I mentioned previously here:
> on method for doing a shared link with gcc is with the following
> link flag:
> -Wl,--rpath -Wl,$(RPATH)
> where $(RPATH) is the path to the shared library, libstdc++.so.
To be more specific, this is only if you don't path to add the path to
LD_LIBRARY_PATH. I believe that is the right method for making sure system
libraries are property found, why don't you want to use this method?
> Since this could be different for each version of gcc, it seems
> that the user-config.jam file should allow something like:
> using gcc : VERSION : COMMAND : RPATH ;
> where, as now:
> VERSION is the version number,
> COMMAND is the compiler command
> but, in addition:
> RPATH is the path to the directory containing libstdc++.so
I'm still not convinced that such a change is necessary.
> so at least the right value is being passed to the init rule.
> However, before I go any further in figuring out how to do this,
> I'd like to know if anyone has a better way to do this?
I think using LD_LIBRARY_PATH is the best method. If, for whatever reason,
that's not OK with you, we need to recall what Michael was suggesting: that
toolset should allow to pass additional compiler and linker options. This is
more general solution than just RPATH. So, you would write:
using gcc : 3.4 : g++ : : -Wl,--rpath -Wl,whatever ;
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk