Library dynamic dependencies on Solaris
John Love-Jensen
eljay@adobe.com
Wed Sep 13 11:49:00 GMT 2006
Hi Kirsten,
The "-Lfoodir" is for the linker to put the foodir on the
linker-search-path.
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.
q.v. http://www.eyrie.org/~eagle/notes/rpath.html
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.
HTH,
--Eljay
Read this reference (look for "rpath")...
http://people.redhat.com/drepper/dsohowto.pdf
Other references (de ja vu!)...
http://gcc.gnu.org/ml/gcc-help/2003-04/msg00273.html
http://gcc.gnu.org/ml/gcc-help/2003-10/msg00093.html
More information about the Gcc-help
mailing list