F2C for Visual C 5.0

 

This is an adaption of the Fortran77 to C translator f2c from netlib. The f2c "compiler" works as expected, the only deviation from the original documentation is in the fact that you can not use a *.f file specifier, i.e. it will compile only one source file at a time. I have included a slightly modified f2c.h include file that conditionally undefines huge etc. modifiers.
The compiler produces C code that must be linked against the runtime libraries libf77.lib and libi77.lib. While the translator itself runs in native Win32 mode, it may be necessary to install the Downhill library available at  http://www.ede.com/free/u2nt (a lightweight Un*x to Win32 compatibility library) if you get unresolved externals during linking.

Remarks on building:
A sample Fortran test program is provided with the source distribution. The Fortran source is translated to C by VC5 custom build step and the resulting C program is compiled with the -MD option to link with libf77.lib and libi77.lib.
There is a potential problem with the binary/text dichotomy of the file opening modes. To be on the safe side, I would recommend to link your program with binmode.obj to set the default file mode to binary. In general, this is required if your Fortran program uses a BACKSPACE.

Original location of this page: http://www.weihenstephan.de/~syring/f2c/f2c.html

Last change on 07/13/1999 by K. M. Syring