From: Judah Milgram Date: Thu, 15 Dec 1994 08:49:49 -0500 To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: How to f2c+djgpp A few weeks ago I asked this question and with a little help managed to get it working. It seems to be a popular topic so here's the summary of the changes. Should this go in the FAQ? Could a pre-compiled libf2c.a be placed in some public ftp site? Should a libf2c.a and f2c.h be included in the djgpp release? Judah Milgram milgram AT glue DOT umd DOT edu *** Running f2c with djgpp. The following changes to the f2c libraries allow compiling and linking with djgpp. I started with an f2c version dated Nov. 1994. DJGPP was v. 1.12. These aren't necessarily the most sensible changes, but they worked for me. Please write if you have a better idea. As for the f2c program itself you can use the pre-compiled MSDOS executable that comes with the f2c release. Look in netlib.att.com in netlib/f2c. Thanks to various net people, especially Dr. James Lupo, for their help on this. Judah Milgram milgram AT glue DOT umd DOT edu ______________________________________________________________________ libf77/makefile: change: CC = cc to: CC = gcc comment out: ld -r -x -o $*.xxx $*.o mv $*.xxx $*.o libf77/s_paus.c: change: extern int getpid(void), isatty(int), pause(void); to: extern int getpid(void), isatty(int); #ifndef _djgpp_std_h extern int pause(void); #endif libi77/makefile: change: CC = cc to: CC = gcc comment out: ld -r -x -o $*.xxx $*.o mv $*.xxx $*.o libi77/fio.h: add to top of file: #ifdef abs #undef abs #endif libi77/rawio.h: comment out entire block: #ifdef MSDOS #include "io.h" #define close _close #define creat _creat #define open _open #define read _read #define write _write #endif To build libf2c.a: Easiest way is to go into the f2c/ directory and do: ar r libf2c.a libf77/*.o libi77/*.o ranlib libf2c.a then copy libf2c.a into djgpp/lib and copy f2c.h into djgpp/include