Making Visual Studio 2019 a Fortran IDE
By Andrew Adams •
I would like to know how I can tune Visual Studio 2019 to have a fully featured modern Fortran IDE for gfortran.
This would include:
- one click compilation
- debuging
- auto-completion
If you also known any other interesting feature I would be interested.
Many thanks.
41 Answer
Gfortran is found in MinGW, so not directly using Windows API, which complicates using it from Visual Studio.
See the following article for a detailed description of the process using CMake:
Fortran for C/C++ developers made easier with CMake.
This involves:
- Creating Visual Studio
.libfiles from MinGW gfortran - Including in the project the module
CMakeAddFortranSubdirectory.cmake - Automatically detect the Fortran runtime library and use it
- Automatically Determine Symbol Mangling Used by Fortran Compiler