Mail Archives: djgpp/1998/10/08/15:49:47
On Thu, 1 Oct 1998, George Marsaglia wrote:
> Those C versions warn that to invoke the gcc compiler, use
>
> gcc -lf2c -lm file.c
> in that order.
>
> But gcc downloaded from djgpp balks at the -lf2c option.
You didn't post the error message(s), so I'm forced to guess what
might go wrong.
First, I assume that you have libf2c.a in the lib subdirectory of your
main DJGPP directory; if not, please download it and copy it there.
Second, the libraries should be at the end of the GCC command line,
like this:
gcc file.c -lf2c -lm
This is because the linker used by DJGPP makes only one pass over the
input files, so the order is important (the DJGPP FAQ explains that in
section 8.9).
If the above doesn't help, add -v to the GCC command line, redirect
its output to a file, and post that file. Here's one way to do that:
redir -o gcc.txt -eo gcc -v file.c -lf2c -lm
(In this example, the GCC messages go to the file `gcc.txt'.)
- Raw text -