From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d6b95a829278b4ba X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-15 12:40:50 PST Path: bga.com!news.sprintlink.net!hookup!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!decwrl!pa.dec.com!mrnews.mro.dec.com!dedwin.mro4.dec.com!edwin From: edwin@dedwin.mro4.dec.com (Daniel K. Edwin) Newsgroups: comp.unix.osf.osf1 Subject: Re: path for shared objects Date: 15 Jul 1994 19:24:08 GMT Organization: OrgFreeware Distribution: world Message-ID: <306noo$34e@mrnews.mro.dec.com> References: Reply-To: edwin@dedwin.mro4.dec.com (Daniel K. Edwin) NNTP-Posting-Host: dedwin.mro4.dec.com In article , mathew@remus.rutgers.edu (Sajee) writes: |> Path: mrnews.mro.dec.com!pa.dec.com!decuac.dec.com!haven.umd.edu!news.umbc.edu!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!rutgers!dziuxsolim.rutgers.edu!igor.rutgers.edu!remus.rutgers.edu!mathew |> From: mathew@remus.rutgers.edu (Sajee) |> Newsgroups: comp.unix.osf.osf1 |> Subject: path for shared objects |> Message-ID: |> Date: 14 Jul 94 19:55:35 GMT |> Organization: Rutgers Univ., New Brunswick, N.J. |> Lines: 10 |> |> |> How do I set up a link such that at link time I specify the full pathanme of a shared object (eg. /home/scm/lib/libscm.so) and at run time the loader will look for the object in the directory I specified; but if the object isn't in the directory I specified the loader should use LD_LIBRARY_PATH. How can this be done? |> |> I thought -rpath option was the answer but I can't get it to work correctly. |> |> HEEELLLP!! |> |> please mail all responses to scm@chesapeake.com |> |> Thanks |> In article , mathew@remus.rutgers.edu (Sajee) writes: |> Path: mrnews.mro.dec.com!pa.dec.com!decuac.dec.com!haven.umd.edu!news.umbc.edu!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!rutgers!dziuxsolim.rutgers.edu!igor.rutgers.edu!remus.rutgers.edu!mathew |> From: mathew@remus.rutgers.edu (Sajee) |> Newsgroups: comp.unix.osf.osf1 |> Subject: path for shared objects |> Message-ID: |> Date: 14 Jul 94 19:55:35 GMT |> Organization: Rutgers Univ., New Brunswick, N.J. |> Lines: 10 |> |> |> How do I set up a link such that at link time I specify the full pathanme of a shared object (eg. /home/scm/lib/libscm.so) and at run time the loader will look for the object in the directory I specified; but if the object isn't in the directory I specified the loader should use LD_LIBRARY_PATH. How can this be done? |> |> I thought -rpath option was the answer but I can't get it to work correctly. |> |> HEEELLLP!! |> |> please mail all responses to scm@chesapeake.com |> |> Thanks |> In article , mathew@remus.rutgers.edu (Sajee) writes: |> Path: mrnews.mro.dec.com!pa.dec.com!decuac.dec.com!haven.umd.edu!news.umbc.edu!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!rutgers!dziuxsolim.rutgers.edu!igor.rutgers.edu!remus.rutgers.edu!mathew |> From: mathew@remus.rutgers.edu (Sajee) |> Newsgroups: comp.unix.osf.osf1 |> Subject: path for shared objects |> Message-ID: |> Date: 14 Jul 94 19:55:35 GMT |> Organization: Rutgers Univ., New Brunswick, N.J. |> Lines: 10 |> |> |> How do I set up a link such that at link time I specify the full pathanme of a shared object (eg. /home/scm/lib/libscm.so) and at run time the loader will look for the object in the directory I specified; but if the object isn't in the directory I specified the loader should use LD_LIBRARY_PATH. How can this be done? |> |> I thought -rpath option was the answer but I can't get it to work correctly. |> |> HEEELLLP!! |> |> please mail all responses to scm@chesapeake.com |> |> Thanks |> Try this cc -o prog -Wl,-rpath,/dir_path prog.c ^ |____ No space between , and -. See man on cc for Wl (el). Dan..