Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 490
Jakub Narębski Avatar asked Dec 09 '11 11:12

Jakub Narębski


2 Answers

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.

like image 68
Vladimir F Героям слава Avatar answered Nov 19 '22 01:11

Vladimir F Героям слава


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

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

like image 35
zbeekman Avatar answered Nov 18 '22 23:11

zbeekman