FORTRAN and C interoperability

Asked

Viewed 61 times

4

Each language has a unique character, that’s a fact! However, how to work with code C in FORTRAN and vice versa? It is possible to enter the code FORTRAN in the C with the directive # include <>?

1 answer

5

It is possible to "mix" C and Fortran, but not in the same file, either directly or through #include.

See, for example, in http://www.cae.tntech.edu/help/programming/mixed_languages

The basic idea is to create files with only compiled functions. These compiled functions can come from both C and Fortran.
Then link (union) files . o to an executable.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.