webpage icon indicating copy to clipboard operation
webpage copied to clipboard

Add MSYS2 as a way of installing gfortran on Windows

Open Beliavsky opened this issue 4 years ago • 2 comments

At https://fortran-lang.org/learn/os_setup/install_gfortran , I think it's fine to keep equation.com as the 1st method to install gfortran on Windows, since it is simple and fast to install. I suggest adding MSYS2 as method fortran-lang/fortran-lang.org#4. I just tried it on Windows 10, and it works fine after following the instructions. Once installed, gfortran --version says GNU Fortran (Rev9, Built by MSYS2 project) 10.2.0 . It takes longer to install than the equation.com compiler binary but comes with more stuff, such as python. A list of MSYS2 packages is here.

Beliavsky avatar Mar 11 '21 19:03 Beliavsky

I'll certainly let my students try to use MSY2 in my Fortran programming course next month, so we'll get some data points on how well this setup strategy works. I have already written a short introduction here which I could contribute.

awvwgk avatar Mar 11 '21 19:03 awvwgk

I am using gfortran on MSYS2 for many years, to test gtk-fortran under Windows. It includes CMake, pkg-config, and all the classical tools you need in a UNIX-like environment. It is slower than on a native Linux environment because many things must be "translated" to make programs work under Windows, but it is very usable.

vmagnin avatar Mar 28 '21 19:03 vmagnin