--rpath -vs- cc1plus
Nick Clifton
nickc@cambridge.redhat.com
Mon Dec 17 04:26:00 GMT 2001
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
More information about the Gcc
mailing list