From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,374409521cdaeffc X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-28 12:07:13 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!news.onramp.net!convex!news.duke.edu!solaris.cc.vt.edu!MathWorks.Com!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!ames!decwrl!pa.dec.com!datum.nyo.dec.com!niagara.nyo.dec.com!frank From: frank@niagara.nyo.dec.com (Frank Wortner) Subject: Re: specifying paths to shared objects Message-ID: <1994Jul28.140405.17874@datum.nyo.dec.com> Keywords: shared lib Sender: usenet@datum.nyo.dec.com (USENET News System) Reply-To: frank@nyo.dec.com Organization: Digital Equipment Corporation X-Newsreader: mxrn 6.18-16 References: <313m4s$aot@remus.rutgers.edu> Date: Thu, 28 Jul 1994 14:04:05 GMT 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