Date: Sun, 4 Oct 1998 12:44:33 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: George Marsaglia cc: djgpp AT delorie DOT com Subject: Re: -lf2c for f2c In-Reply-To: <3613875B.D29BE24B@stat.fsu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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'.)