In order to create programs in C++ language, we will have to install a program known as Compiler. A compiler is a program which
converts our programming instructions written in C language
to machine-code form so that they can be read and executed by a computer.
Let's see how to set up download, install the C++ compiler, provided by MinGW.
MinGW provides a complete open source programming tool set such as development environment and
the GNU Compiler Collection (GCC) for many programming languages such as C, C++, ADA and Fortran etc.
In order to download and install MinGW C++ Compiler you have to open the link to Download MinGW C++ Compiler and
which automatically downloads the mingw-get-setup.exe file in a short while, as shown in the picture below -
As soon as you click on the blue download button, it downloads the mingw-get-setup.exe file, which is used to install MinGW Installation Manager.
After the download finishes, you need to double click on the downloaded mingw-get-setup.exe file and
you will be displayed an MinGW Installation Manager window as displayed below and you just need to click on the Install button on it.
This will install MinGW Installation Manager,
which is eventually used to download and install MinGW GCC C++ Compiler.
In the next window of Installation, you will asked to select the installation directory for MinGW GCC C++ Compiler to install into.
By default, this compiler will be installed in C:\MinGW directory, but you
can change the location of the folder where the compiler will be installed by clicking on the Change button.
Though it is recommended to install it in the default directory :
We are also going to install the MinGW GCC C++ Compiler in the its default location, hence we are just going to click Continue button on this window.
In the next window you are shown a window with progress bar, displaying that MinGW Installation Manager is being downloaded from the server and installed.
After the installation of MinGW Installation Manager is over, you are presented a window of MinGW Installation Manager,
where you are shown 7 options, out ot which
we have to select only two package options, such as -
We will have to right click on these two options and select the option Mark for Installation, as shown in the window below.
After marking the two options for installation, click on the Installation button on top-left and click on third option Apply changes,
as shown in the next window.
When you click on the Apply changes button, a new window pops-up where you need to click on Apply button to start the downloading of the two
package options you have selected, such as -
Clicking on the Apply changes starts the downloading of the two packages.
Next, once the downloading finishes, the two packages are installed and you are notified about the applied changed in the next window.
Clicking on the Apply changes starts the downloading of two the packages.
This concludes the installation of MinGW GCC C++ Compiler. In the next tutorial, we are going to explain how to configure or set environment variables for MinGW GCC C++ Compiler, in order to
compiler and execute C++ programs.