C development requires a GNU Compiler Collection (GCC) to compile and execute the C code.
GCC's external interface follows Unix conventions. Users invoke a
language-specific driver program (gcc for C, g++ for C++, etc.), which interprets command arguments, calls the actual compiler,
runs the assembler on the output, and then optionally runs the linker to produce a complete executable binary.
GNU Compiler Collection (GCC) configuration for Windows machine using MinGW
Ensure your system was already loaded with the GCC. To check that open the command prompt and execute the command g++ --version, it will show the installed GCC's version in the command prompt only if exist otherwise download it from the official site and install it manually.
Visit the official website to download the MinGW and install as per below instructions.
Install the MinGW in the following default directory C:\MinGW and you can move the MinGW software to another location as per your wish.
Check the MinGW is updated the Environment Variable or not, by opening the command prompt and execute the command gcc --version. It will show the installed GCC's version otherwise follow the below steps to setup the environment variable path.
Step by Step installation guide of MinGW
1. Double click the installer and click the Install button.
2. Click the Continue button.
3. It requires an active internet connection to download the required packages from the internet. Once all the required packages gets downloaded, click the Continue button.
4. Select the mingw32-gcc-g++-bin by right click the item and click the context menu item Mark for Installation.
5. Click the top menu Installation and then click the menu item Apply Changes.
6. Click the confirmation button Apply, it will install the selected package from the internet.
7. Finally Click the Close button.
Set Path of MinGW in Windows system environment variables
1. Copy the path of the MinGW's bin folder
2. Open the Environment variable dialog using the Windows Run. Press Win + R and run the command rundll32.exe sysdm.cpl,EditEnvironmentVariables
or open the Environment variable by windows search using the search text environment variable
3. Select the Path variable and click the Edit which is under User Variable
4. Click the New button and add the path C:\MinGW\bin and finally click the Ok button.
5. Open the new command prompt and execute the command gcc --version, it will show the installed MinGW's version.
6. MinGW configuration succussfully completed, let try our first C program in the next chapter.