In this blog post, you will learn how to install MinGW for C++ development on Windows.

  1. Download MinGW from the downloads link on MinGW’s site – this will take you to SourceForge. Download mingw-get-setup.exe.
  2. Launch the MinGW installer once the download completes. Click Install.
  3. I recommend continuing with the defaults for Step 1. This path will be used to set environment path variable later. Click Continue.
  4. Download will begin – this may take a few minutes depending on your connection.
  5. Verify Basic Setup is selected. Choose the following packages: mingw32-base, mingw32-gcc-g++ & msys-base. Once checked, close the window (I know that’s weird).
  6. Click Review Changes.
  7. Click Apply.
  8. Download will begin.
  9. After extraction completes, click Close.
  10. Add MinGW to PATH
    1. Right click on Computer > Properties > Advanced system settings > Environment Variables.
    2. Edit Path System variable
    3. Add C:\MinGW\binC:\MinGW\msys\1.0\bin
  11. Launch a command prompt and verify we can run g++. You are now set to begin C++ development.
  12. Obligatory Hello World program.