MinGW GCC, GFortran, and GNU Make on Windows
MSYS2 is recommended over MinGW
The GNU compilers (gcc, g++ and gfortran) and GNU Make are available using MinGW for native Windows:
Download MinGW-w64 compilers and install to “C:/mingw” using:
- Architecture:
x86_64
- Threads:
posix
- Exception:
seh
This also installs GNU make
at “C:/mingw/bin/mingw32-make.exe”.
Add “c:/mingw/bin” to your PATH under Control Panel → System → Advanced.
GNU Make
For convenience, symlink make
to mingw32-make
:
cd c:/mingw/bin
mklink make.exe mingw32-make.exe
You may need to add user permission to create symbolic links.
CMake on Windows is often used as well.
Alternatives
- Windows Subsystem for Linux gives near-native Linux functionality in a Windows window. It’s much easier to do certain development tasks in WSL.
- MSYS2 is a more powerful way to use MinGW, giving newer packages and a wider selection of programs.