X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Wed, 2 Jan 2002 08:50:47 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: schaecsn cc: djgpp AT delorie DOT com Subject: Re: cannot find -lgcc In-Reply-To: <3C32376B.4668A3B4@gmx.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 1 Jan 2002, schaecsn wrote: > hi just installed djgpp-2.03, gcc-3.0.3 and some other utilites. What version of Binutils did you install? What does "ld --version" print? > >gcc hello.c -o hello.exe -O2 -Wall > c:/djgpp/bin/ld.exe: cannot find -lgcc > collect2: ld returned 1 exit status > > Well, I do have libgcc.a: > >find / | grep libgcc.a > /djgpp/lib/gcc-lib/djgpp/3.03/libgcc.a Was this "find / | grep" command invoked from the DOS box or from the Linux shell prompt? If the latter, it's not an evidence that the DJGPP linker will see the file, because that depends on how the C: drive is mapped. Please make sure the library is visible from the DOS box. > when I compile a C file with -v I get that at the end: > c:/djgpp/lib/gcc-lib/djgpp/3.03/collect2.exe c:/djgpp/lib/crt0.o > -Lc:/djgpp/lib -Lc:/djgpp/lib/gcc-lib/djgpp/3.03 -Lc:/djgpp/bin -Lc:/djgpp/lib > -Lc:/djgpp/lib/gcc-lib/djgpp/3.03/../../.. C:\TMP\cc0iOfUR.o -lgcc -lc -lgcc > -Tdjgpp-x.djl > c:/djgpp/bin/ld.exe: cannot find -lgcc First, please show the entire output of compiling with -v, not just some part of it. The parts that you removed could have vital clues to the nature of your problem. Second, what happens if you use the "-Xlinker --verbose" switch on the compilation command line--does this give any clues about the nature of the problem? How about "-Xlinker --trace"? Finally, it's possible that your libgcc.a is somehow damaged. Try listing its contents with, e.g., "nm -A", and see if there are some error messages.