Automatically generate Fortran 2003 bindings from C library headers (using native iso_c_bindings module)

Is there a tool for automatically creating Fortan bindings from the C library header using the iso_c_bindings built-in module from the Fortran 2003 standard?

I'm not interested in translating C into Fortran, but only generating bindings.

+7
source share
2 answers

An automatic tool was used to get the gtk-fortran bindings. This is a Python script cfwrapper.py . You may be able to adapt it for your needs, although for my small problems I finally decided to make the bindings manually.

+3
source

Another project to consider is h2m: https://github.com/dan-nagle/h2m

However, at this time on macOS, I cannot compile h2m.

+1
source

All Articles