Mail Archives: djgpp/2002/01/02/01:57:28
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.
- Raw text -