Setting up MinGW on Windows

Algozenith
3 min readFeb 14, 2022

MinGW is a compiler system based on the GNU GCC and Binutils projects that compiles and links code to be run on Win32 (Windows) systems. It provides C, C++ and Fortran compilers plus other related tools. ‘MinGW’ refers to the “Minimalist GNU for Windows” project.

For beginners setting up MinGW can be a daunting task, so follow along the steps mentioned below to set up MinGW on your local windows machine.

Step 1: Download and Install MinGW

Search for MinGW on google and go to their website.

  • Once downloaded, run the file and click on install
  • Click on continue and don’t change the default settings.
  • Once the download is complete click on continue, this would launch the MinGW installation manager.

Step 2: Installing the packages using the MinGW installer.

  • In the installation manager, right-click on all the packages one by one and click on the mark for installation.
  • Once all the packages have been marked, on the left-hand top side, click on installation then on apply changes
  • This would start the installation of all the packages, this might take some time, so don’t close any window.
  • Once the installation is complete, the checklist next to packages would turn green, now you can close the installer window

Step 3: Adding MinGW bin to the system path

  • Go to Local Disk C: > MinGW>bin
  • And copy the path
  • Next, go to control panel > system and security > system settings

and click on advanced settings

  • Click on environment variables.
  • And choose path > edit.
  • Now click on new and paste the path that we copied in the beginning (C:\MinGW\bin).
  • And click on ok

Step 4: Check if g++ is installed

  • Open a command prompt and type the following command

g++ — version

Voila! you are done. Now it’s time to start coding, so check out the courses on Algozenith and start enjoying coding.

--

--