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.
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.
>>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.