Installing GCC 15+, CMake, GDB, and Git on Windows

Special thanks to Brecht Sanders, creator of WinLibs which enables us to install almost everything in one easy package. Cheers Brecht!

Due to my use of C23 features and defer, the code of the Golden Path requires GCC 15+ or Clang 22+.

WinGet

Open a Powershell window (NOT cmd). Enter the following command:

winget install BrechtSanders.WinLibs.POSIX.UCRT Git.Git

If the above works, great! Now verify with the commands at the bottom of the page. If it didn't work, you can install things manually...

Manual Installation

  1. Visit this URL: WinLibs.com/#download-release
  2. Download the latest Win64 release - it should have POSIX threads, UCRT.

  3. Open the downloaded file. It should contain a single folder, called "mingw64". Extract that folder to a place of your choosing - I recommend the root of your main drive (C: in most cases).
  4. Test that the downloaded GCC works by opening a Powershell window and type the following command (change the directory if you used something different): C:/mingw64/bin/gcc.exe --version You should see something like the following: gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r5) 15.2.0 Copyright (C) 2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  5. In the Windows search bar, type "env" and select "Edit the system environment variables."
  6. Click "Environment Variables."
  7. Select "Path" and click the "Edit..." button.
  8. Click "New" and copy-paste the full directory containing gcc.exe - if you copied the mingw64 folder to the root of your C: drive, this will be "C:/mingw64/bin"
  9. Click OK on each window to close them.
  10. Close any open Powershell windows and open a new one. Type: gcc --version
  11. If you got the same output as before when you typed the full directory, then MinGW is installed correctly. Lastly, we need Git.

    1. Visit the GitForWindows.org website and download the installer.
    2. Run the installer and follow the prompts.
    3. When complete, open a Powershell and type the following command: git --version

    Verify the Installation

    Check your installation with the following commands (press enter after each one and check the output):

    gcc --version cmake --version gdb --version git --version