How to Install a GCC C++ Compiler for Windows


C++



In this article, we will show how to install a GCC C++ compiler for the windows operating system.

A GCC compiler stands for a GNC Compiler Collection, which is a compiler system produced by the GNU Project, which supports various programming languages, one of which is C++.

So in order to download the GCC C++ compiler for windows, visit the http://mingw-w64.org/doku.php website.

mingw-w64 offers a C++ compiler for 64-bit and 32-bit windows operating systems.

Once you get to this page, click on the 'Downloads' tab.

mingw-w64 home page

Clicking on the 'Downloads' tab should bring you to the following Downloads page shown below.

mingw-w64 downloads page

You then click on 'MingW-W64-builds'.

This brings you to the following page shown below.

mingw-w64 mingw builds page

This should now bring you to a page, where the automatic download begins.

mingw-w64 sourceforge page

Once the download has completed, you can then run the file in order to download the compiler.

As you are downloading the compiler, you'll eventually reach to settings setup.

This is shown below.

mingw-w64 setup settings

If you are on a 32-bit Windows system, select the i686 setting for the Architecture feature. If you are on a 64-bit Windows system, select the x86_64 setting.

Continue with the installation.

After the installation is complete, the last thing you have to make sure to do is make sure that there is set a path to the GCC C++ compiler set in the Windows environment variables. This way, the Windows operating system knows exactly where the compiler is located on the PC.

Once you have done this, to make sure that the compiler is installed, open up the Command Prompt in Windows and enter in the following shown below.



If you get an output showing the version, then you have it successfully installed.

If you get an error message, such as command not recognized, then there is some error. You may want to recheck your environmental variables again to make sure all is correct with it.

So this is how to install a GCC C++ compiler for Windows.

HTML Comment Box is loading comments...