How to prepare a fortran module from a C header file?

末鹿安然 提交于 2019-12-06 13:16:13

If your aim is to make life easy for fortran programmers and help them to use your C code directly in their program then you probably want to look at generating fortran modules that provide interfaces. These are somewhat similar to your example header in that they define the routine type and the required inputs and outputs.

I'm not particularly experienced in this so I won't give a specific example here but I'll refer you to this site. Another useful source of information would be to look at how other packages do this, for example netcdf and PETSc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!