This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: g++, RH 2.1 and rpath
- From: "Ajay Bansal" <Ajay_Bansal at infosys dot com>
- To: "Alexandre Oliva" <aoliva at redhat dot com>
- Cc: <gcc-help at gcc dot gnu dot org>,"Pankaj Garg" <pankaj_garg at infosys dot com>
- Date: Wed, 2 Jul 2003 20:52:21 +0530
- Subject: RE: g++, RH 2.1 and rpath
If I use rpath, do I still need to use -L for specifying library search
paths?
-----Original Message-----
From: Alexandre Oliva [mailto:aoliva@redhat.com]
Sent: Wednesday, July 02, 2003 8:50 PM
To: Ajay Bansal
Cc: gcc-help@gcc.gnu.org; Pankaj Garg
On Jul 2, 2003, "Ajay Bansal" <Ajay_Bansal@infosys.com> wrote:
> /usr/bin/ld: warning: liblib2.so, needed by
> /home/thirdparty/lib/liblib1.so, not found (try using -rpath or
> -rpath-link)
> So I use rpath. But then I get following error
-rpath, as you found out, is a flag to the linker, not to the compiler.
You can get the compiler to pass flags to the linker using the -Wl,
option: -Wl,-rpath,/home/thirdparty/lib, or -Xlinker -rpath -Xlinker
/home/thirdparth/lib.
BTW, what's RH 2.1?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer