Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29251 Discussions

Automatic generation of C/C++ header files?

Intel_C_Intel
Employee
359 Views

Hello,

I have found the new option /gen-interfacesin the Intel Fortran Compiler most useful. It allows the user to view and check (/warn-interfaces) all interfaces in your source code, as the option neatly generates one *_mod.f90 file for each function/subroutine in your program.

As we are calling many FORTRANfunctions from C/C++, I wonder if there is any hope to automatically translate all these *_mod.f90 files to C/C++ header files? I have tried to use F2C, but as the compiler generated interfaces all are FORTRAN 90, it is not straight forward. Of course programs like "sed" may be used to convert from FORTRAN 90 to FORTRAN 77, but this resolution has turned out to be amazingly inelegant, and not completely foolproof.

So do you have any recipe to help automatically translate the compiler generated *_mod.f90 files to C/C++ header files? (Oh, we have around 700 of these files, so a foolproof translator would be most appreciated! :-).

Best Regards,

Lars Petter Endresen

0 Kudos
0 Replies
Reply