Fortran Wiki
Interoperability

Fortran interoperability is possible with many other languages.

C

Fortran 2003 provides standardized support for C interoperability.

See c_interface_module for an example of using type aliases to produce better-defined C interface prototypes.

C++

Chasm generates Fortran-C++ interfacing code.

FortWrap generates code to call Fortran from C++.

ObjexxFCL is a C++ library that supports integration of C++ and Fortran, providing Fortran-compatible array and string support.

C#

See C# Interoperability.

Lua

Lua is a highly portable scripting language, suitable for inclusion in host programs. It is widely used for configuration files, and to this end is also useful for Fortran applications, a wrapper library called Aotus is available for this purpose.

Octave

See OctaveFortran on the Octave wiki.

OpenCL

A language that allows to write parallel code for massively parallel processors like graphical processing units (GPUs), accelerator boards and multi-core CPUs. OpenCL is based on a C library, but you can run OpenCL code directly from Fortran with the FortranCL library.

Python

See Python.

Tcl

See Tcl.

Compilation or translation from Fortran to other languages

Several programs compile or translate Fortran code to other languages:

Fortran to C

f2c This is still widely distributed and multiple versions have been developed.

fwrap wraps Fortran code in C, Cython and Python.

promulaFortran A commercial program.

Fortran to C++

f2cpp

F2C++

Fable

Fortran to Java

f2j

Fortran to Lisp

f2cl

Fortran to Python

fwrap wraps Fortran code in C, Cython and Python.