Node: C Interfacing Tools, Next: , Up: Interoperating with C and C++



C Interfacing Tools

Even if you don't actually use it as a compiler, f2c from ftp://ftp.netlib.org/f2c/src, can be a useful tool when you're interfacing (linking) Fortran and C. See Generating Skeletons and Prototypes with f2c.

To use f2c for this purpose you only need retrieve and build the src directory from the distribution, consult the README instructions there for machine-specifics, and install the f2c program on your path.

Something else that might be useful is cfortran.h from ftp://zebra.desy.de/cfortran. This is a fairly general tool which can be used to generate interfaces for calling in both directions between Fortran and C. It can be used in f2c mode with g77--consult its documentation for details.