The codes we write are in the high-level language. Those codes which we write are referred as the Source Code. In order to convert our C program source code to Machine code, we need to compile it. The compiler is the one, which converts source code to Machine code. In simple words, you can say that a compiler converts human-readable format to a machine-readable format.
- GCC (GNU Compiler Collection) is a compiler used to compile both C and C++ programs.
- GCC is just a compiler. It is not an IDE ( Integrated Development Environment ) such as Turbo C++, Borland C++ and Dev C++.
- We need to write the source code using the notepad or any other text editor.
- We have to use window’s command prompt to compile and execute C and C++ programs.
Follow the steps described below to Install the GCC Compiler.
- Go to https://sourceforge.net/projects/mingw/files/
- Download the lattest version. Click on Download mingw-get-setup.exe.
- Save the .exe file to the local drive.
- Once the download is complete, double click on the setup.exe file. And click Run.
- Then the installation dialogbox would appear. Click on Install.
- Then follow the steps below.
- The downloading process would take some time. After finishing the downloading click on Continue button. Then the MinGW Installation Manager dialogbox would appear.
- Select all the Packages and goto Installations --> Apply Changes.
- Then a new dialog box would appear. Click Apply on that dialog box.
- Then the packages would install. And it would take a few minutes.
After completing the downloading, we have to define the path of our source code for the compiler. Follow the Set the Compilation Path for the IDE then. After setting the path Restart the system.