This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --rpath -vs- cc1plus


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]