Library dynamic dependencies on Solaris

John Love-Jensen
Wed Sep 13 11:49:00 GMT 2006

Hi Kirsten,

The "-Lfoodir" is for the linker to put the foodir on the

I'm not familiar with "-LDIR foodir".  Maybe the top level toolchain driver
treats that as a "-L foodir -Wl,--rpath,foodir"?

On Solaris, the trick I've used to bake in the library search directory is
the -rpath flag used by the linker to brand the path (absolute, or relative)
into the shared object.


Alternatively, you can do what some applications do and have a front end
/bin/sh launch script (usually generated by the installer) that sets the
environment variables up, including LD_LIBRARY_PATH.


Read this reference (look for "rpath")...

Other references (de ja vu!)...

More information about the Gcc-help mailing list