This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linker problem with GCC 3.0
- To: gcc-help at gcc dot gnu dot org
- Subject: Linker problem with GCC 3.0
- From: "Karthikeyan M. D" <dkarthik at wilco-int dot com>
- Date: Mon, 25 Jun 2001 15:41:48 +0530
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