Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: frank@niagara.nyo.dec.com (Frank Wortner)
Subject: Re: specifying paths to shared objects
Date: Thu, 28 Jul 1994 14:04:05 GMT	[thread overview]
Message-ID: <1994Jul28.140405.17874@datum.nyo.dec.com> (raw)
In-Reply-To: 313m4s$aot@remus.rutgers.edu


In article <313m4s$aot@remus.rutgers.edu>, mathew@remus.rutgers.edu (Sajee) writes:
|>Hello,
|>
|>I want to know how I can tell ld the path to a shared object when it is creating an executable.  I dont want to use LD_LIBRARY_PATH.  I need a method whereby I can specify the paths to certain shared objects at link time.  These shared objs will not found in the default directories.
|>
|>I've tried -rpath but it doesn't seem to work.

You could try setting the SONAME when you build the shared object.  Normally,
this is set to the last (filename) component of the object.  For example
the SONAME of /some/where/libfoo.so is "libfoo.so".  You can hardcode a
path to a library by setting the SONAME to the full pathname of the library.

	ld -shared -soname /some/where/libfoo.so -o libfoo.so *.o ...

See the loader(5) man page for details.

						Frank


      reply	other threads:[~1994-07-28 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-07-26 18:54 specifying paths to shared objects Sajee
1994-07-28 14:04 ` Frank Wortner [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox