Install gcc on windows – GNU Compiler Collection ported to windows using MinGW

In this post we are going to show you how to install GCC on windows. GCC (GNU compiler collection) is a very famous compiler used for various programming languages. It has been used as a standard compiler on most of UNIX-like systems, including Linux. GCC for windows is also called as MinGW (Minimalist GNU for Windows).

There are two ways to install gcc on windows. It already comes with the installation package of Code::Blocks IDE. So, if you are using Code::Blocks IDE, then you already have GCC installed in your computer. But if you want to install just GCC and not the entire IDE, then following steps will guide you to do so.
Step 1: Go to this link and download the automotic installer.

Step 2: Double click on the downloaded file and begin installation process.

Step 3: Click Next. Then it will ask for repository catalogues . the default option of using the pre-packaged repository catalogues.

Step 4: Mark “I accept the agreement” and proceed.

Step 5: Keep the default installation path i.e. C:MinGW. (If at all you want to change the installation path then please remember that there should not be any blank spaces in the path, for eg. you can’t install, MinGW in C:Program Files)

Step 6: Click next. Then it will ask you which all programming compiler you want to install Select appropriate compiler and click next.

Step 7: Finally click on install to begin downloading and installation of compilers.

Step 8: After the installation is finished. Go to Control panel and type “environment variables” in the search tab. And then open “Edit the system environment variables” under the system group from the results.

Step 9: Then click on environment variables at the bottom of the window. environment variables in advance system settingsStep 10: Then under the system variables group select the path option and click on edit.
edit environment path variablesStep 11: Then just add the path C:MinGWbin at the end. (don’t forget to put semicolon and don’t leave and blank space in between semicolon and the path)adding mingw path to environment varialbesThen click OK, OK and apply. Thus you have successfully installed gcc on your windows system. Now you ready to use your gcc compiler via command prompt.

Related posts: