I already received a lot of replies! Thanks to all those replied.
Answers:
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):
http://www.inscoe.org/load.cgi?compilesun
http://www.cis.ohio-state.edu/Computing-Environment/Solaris-support/solaris-
notes.html
Sundar
-----Original Message-----
I am creating shared libraries ( .so files) on Solaris 2.6 using for
example:
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?
Sundar
------------------------------------------------
Email: mparamas@iupui.edu
S
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
S
T
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:12 CDT