Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
161 Views

module files transformation

Is there any approach to convert a module file generated by compiler other than ifort (eg. gfortran) so that an ifort-compiled program can link to ? On Windows OS, there is a tool Module Wizard which can generate interfaces for DLLs, any Linux tool can do that job? Thanks for help.

0 Kudos
21 Replies
Highlighted
Black Belt
15 Views

Blane J. wrote:

Thanks mecej4, but the compilation journey is really annoying...

I agree. The Fortran portions of NetCDF are seemingly low-priority for Unidata. Cmake, likewise, is great when it works. When it does not, and you try to find out how to fix the problem, you find that the Cmake manual is over 150 pages long, whereas the man-page for make is about 10 screens.

0 Kudos
Highlighted
15 Views

>>Given your comment, "For libraries that don't provide bind(C) interfaces it doesn't," would you or other readers know whether directive-enhanced compilation options with gfortran and Intel Fortran can be a workaround for those who cannot use bind(C) attributes in their Fortran code but wish to consume a shared library (.so) created using gfortran in a program created using Intel Fortran or vice versa?

If (when) the 3rd party library C++ interfaces are provided, then you can always revert back to having your Fortran code USE a module of your own that calls a C++ shell function you write, that calls the 3rd party library.

Note, on the USE YourShellModule statement, you can include NameYouWant => FortranShellToCPPfunction to have the Fortran use the documented function names.

Jim Dempsey

0 Kudos