Quickstart Fortran Installer for Windows

Motivated by several recent discussions for installing and building on Windows, I’ve put together a ‘Quickstart Fortran’ Installer for Windows which includes: GCC-Gfortran, fpm, Git and OpenBLAS (BLAS/LAPACK).
The installation also contains a helper script to fetch, build and install the latest version of stdlib.

The installer is aimed at beginners or those not familiar with MSYS2 or WSL.
Please try it out if you are a Windows user and let me know how you find it - feedback is welcome.

Some ideas for the future:



1 Like

Moving it to Fortran-lang is a great idea, or if not, adding more people as maintainers to bring longevity to the project with continuous updates. Otherwise, an automated workflow could be set up to release a new version of installation binary with every new version release of its components (gfortran, fpm, OpenBLAS, …), although I am not sure if that is possible.


Just tested it and works like a charm. :rocket:

Also nice to see the Fortran logo as the desktop shortcut.

Is there a way to load the path variables in a Powershell window?


Absolutely brilliant!


I don’t use Powershell, so I didn’t think about this. If you select ‘Add to path’ when installing, then it should work when you start Powershell. Otherwise, you could start Powershell from the Quickstart Fortran command prompt shortcut. Perhaps it should also install a Powershell prompt shortcut as well?

Thank you, Laurence. This makes me want to get a Windows computer just to try it.


That’s like TUG’s TeX Collection DVD including proTeXt ready to go. Great!

1 Like

When I’m coding on Windows I use CMD and can run the Windows equivalents (findstr, cd, mkdir, del etc.) of Unix commands, Fortran compilers, Python and R, etc. I know that Powershell is Microsoft’s modern shell, but what does it offer scientific programmers? Please excuse the digression.

I don’t think an additional Powershell shortcut is that helpful. Your suggestion works, after opening the Quickstart-Fortran command prompt, I can run the command powershell to switch the shell.

The commands

PS C:\Users\ipribec\Documents> Get-Command fpm
PS C:\Users\ipribec\Documents> Get-Command gfortran

show the locations of the installed executables (in regular Windows cmd use where).

1 Like

My suggestion for a future extension of the package is to also include options for MPICH, OpenMPI, and OpenCoarrays (and possibly even Intel Fortran Compilers and MPI library, although I am not sure how the licensing would work, but I think it should be fine since this is just a redistribution convenience without touching the Intel products in any way, perhaps like redistributing their runtime libraries).


Thank you very much for this initiative.

Regarding OpenCoarrays, is it still true that this functionality requires WSL, as written in Setting up your OS? The Opencoarrays documentation for Windows provides a link to a script for use in an existing WSL installation (and with a rather old GCC).

If meanwhile it has become possible to set up OpenCoarrays in Windows without depending on WSL, then I think it could be a valuable extension to the installer. In that case, I could help with testing.


Yes, I agree this would be a good addition. Unfortunately as far as I know, and as @S.G.Janssens points out, I think OpenCoarrays still isn’t possible on native Windows because it needs an MPI 3 implementation for which there isn’t one available on Windows.


This installed easily for me (once I reassured both the browser and Windows that it was OK to keep and run). I would ask that the shortcut be modified so that it specifies the path to init.bat in the command to execute and that init.bat itself not rely on the current directory. I like to change shortcuts to specify a “Start in” folder of my work folder. What you have now assumes that the installation folder will be used, and then at the end does a cd to the user’s Documents area. I think you can use %~dp0 to get the path to the folder containing the currently executing .bat file. (See What does %~d0 mean in a Windows batch file? - Stack Overflow)


Thanks for the feedback @sblionel! It’s useful to know what kind of workflow people use on Windows.
I’ve updated the bat scripts accordingly, see here for the changes: Update: to not rely on launch folder. · LKedward/quickstart-fortran@a1358c8 (github.com).


Thanks @sblionel for trying that and for providing feedback!

@lkedward , looks good. Thanks!

I’m wondering if GNU make for Windows would also be of interest?

CMake on the other hand can be downloaded and installed pretty easily from here: Download | CMake
In case of CMake on Windows, it might be necessary to download ninja too: Releases · ninja-build/ninja · GitHub

Make could be an optional components for developers. Otherwise fpm is the build system the quickstart installer should aim to promote.

Another point to mention in the FAQs, the link flag for BLAS and LAPACK is -lopenblas?

1 Like

The WinLibs version of mingw64-gcc that I’ve used actually includes GNU make v4.3 but it’s called mingw32-make:

C:\> mingw32-make --version
GNU Make 4.3
Built for x86_64-w64-mingw32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I could perhaps create a helper script to alias it to make. Also worth mentioning in the README.

Yes, good point! Cheers.

1 Like

Looks great! Especially thank you for offline installer as currently mingw64 didn’t update their offline tarballs for a long time. I hope offline installer will be presented further.

I didn’t try it yet, does the “toolchain” contain gcc,g++ and OpenMP as well?

1 Like