[SUMMARY] ld and Shared Library Path

From: Paramasivam, Meenakshisundaram (mparamas@iupui.edu)
Date: Thu Jul 20 2000 - 12:20:22 CDT

I already received a lot of replies! Thanks to all those replied.


        Pay more attention to "man ld" (I got carried away by HP's
SHLIB_PATH definition)

        1) LD_LIBRARY_PATH

        2) -R option to specify a runtime library path (or LD_RUN_PATH
during pre-compile)
        Useful links on this topic (thanks to Kevin):


-----Original Message-----
I am creating shared libraries ( .so files) on Solaris 2.6 using for

  ld -G -o libtest.so test.o /portal/solaris/so/apps.so
When I try to run an application on that uses the libtest.so shared library
on another Solaris (2.7) machine, the application crashes since the path for
apps.so is hardwired in libtest.so. Creating exact same path and copying
apps.so fixes the problem.

On HP-UX machines, I can use a +s option in ld to set the SHLIB_PATH. "man
ld" on Solaris does not state this option.

Here are my questions:

1) What is the environment variable to set SHARED LIBRARY PATH?

2) What is the option in "ld" to point to SHARED LIBARAY PATH so that I can
avoid hardwiring of UNIX file system path?

Email: mparamas@iupui.edu

U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:12 CDT