0

I have a program written in Fortran, and some variables are defined in .inc files. I want to call self-written C function from the Fortran program, and this function must read and write data to the variables. How should I let know C function about this variables? I'm using gcc and gfortran as compilers.

Kyle Kanos
  • 3,257
  • 2
  • 23
  • 37
user983302
  • 1,377
  • 3
  • 14
  • 23
  • [ISO_C_BINDING](http://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html). See a worked example [here](https://www.scorec.rpi.edu/wiki/Iso_c_binding) – Kyle Kanos Nov 12 '13 at 16:23
  • Often what's found in "INC files" are declarations for common blocks. Is that your situation? – IanH Nov 12 '13 at 18:59

0 Answers0