Linker problem with GCC 3.0
Karthikeyan M. D
dkarthik@wilco-int.com
Mon Jun 25 03:13:00 GMT 2001
Hi,
I built GCC 3.0 and binutils-2.11.2 together on sparc-sun-solaris2.6
machine, gcc is using GNU assembler and linker (version 2.11.2). When I try
to compile a program and link it to a shared library, the linker says
"cannot find the library".
% gcc -g -o test-ld test-ld.c -lA
/tmp/dkarthik/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0/../../../../sparc-sun
-solaris2.6/bin/ld: cannot find -lA
collect2: ld returned 1 exit status
I've also set the LD_LIBRARY_PATH env. variable properly (for libA.so).
I configured gcc-3.0 and binutils-2.11.2 together (by moving binutils-2.11.2
inside gcc-3.0) with the following
% ../gcc-3.0/configure --prefix=/tmp/dkarthik/gnu --enable-shared
--enable-threads=posix --with-gnu-as --with-gnu-ld --with-stabs
Did I miss anything ?
Thanks and Regards,
Karthik
ps.: the same thing works fine with gcc-2.95.3 and binutils-2.11.
_______________________________________________
Karthikeyan M D * +91-40-340 8600 x8422
More information about the Gcc-help
mailing list