Interoperability FORTRAN and C

3

Each language has a characteristic that makes it unique, this is fact! However, how do you work with code C in FORTRAN and vice versa? Is it possible to insert the code FORTRAN into C with the # include <> directive?

    
asked by anonymous 06.06.2015 / 19:35

1 answer

4

You can "mix" C and Fortran, but not in the same file, either directly or through #include .

See, for example, link

The basic idea is to create files with compiled-only functions. These compiled functions can both come from C and from Fortran.
Then you can bind (or join) the .o files to an executable.

    
06.06.2015 / 19:41