This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: --rpath -vs- cc1plus
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: tromey at redhat dot com
- Cc: GCC Hackers <gcc at gcc dot gnu dot org>
- Date: 17 Dec 2001 09:52:58 +0000
- Subject: Re: --rpath -vs- cc1plus
- References: <87snacc815.fsf@creche.redhat.com>
Hi Tom,
> I invoked gcc and got this error:
>
> creche. gcc foo.cc -lgcj -lgcjgc -lzgcj
> /usr/bin/ld: warning: libgcc_s.so.1, needed by
> /x1/egcs/install/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../libgcj.so,
> not found (try using --rpath)
>
> So I used --rpath and got a different error:
>
> creche. gcc foo.cc --rpath /x1/egcs/install/lib -lgcj -lgcjgc -lzgcj
> cc1plus: unrecognized option `-frpath'
Err, since you are using gcc you need to prefix the option with -Wl,
in order to pass it on to the linker and not have it interpreted by
gcc itself. ie:
gcc foo.cc -Wl,--rpath -Wl,/x1/egcs/install/lib -lgcj -lgcjgc -lzgcj
Cheers
Nick