cbindingfortranfortran2003fortran-iso-c-binding

Automatic generation of Fortran 2003 bindings from C library headers (using iso_c_bindings intrinsic module)


Is there a tool to automatically generate Fortan bindings from C library header, using intrinsic iso_c_bindings module from Fortran 2003 standard?

I am not interested in translating C to Fortran, but only generating bindings.


Solution

  • An automatic tool was used to get the gtk-fortran bindings. It is a Python script cfwrapper.py. You might be able to adapt it to for your needs, although for my small problems I finally chose to make the bindings by hand.