Installation of g++ compiler

Installation of GCC:

To install the GCC Compiler, we need to follow the steps:

1. Download the MinGW-w64 installer:

2. Install MinGW:

  • Run the “mingw-get-setup.exe” file you just downloaded.
  • Choose the installation directory (the default is usually ‘c:\MinGW’).

3. Select and Install GCC Components:

  • Open the MinGW Installation Manager ‘mingw-get’.
  • In the MinGW Installation Manager, select the following packages:
    1. “mingw32-gcc-g++": The GNU C++ compiler.
    2. “mingw32-gcc-objc”: The GNU Objective-C compiler (optional).
  • To select a package, check the box next to it.
  • After selecting the packages, go to the “Installation” menu and click “Apply Changes.”

4. Add MinGW to the System Path:

  • Locate the “bin” directory within your MinGW installation directory (e.g., “c:\MinGW\bin”).

Add the directory to your system.

  • Open the windows and search
  • Search for “Environment Variables” button.
  • Under “User variables,” find the “Path” variable and click “Edit.”
  • Click “New” and add the path to the “c:\MinGW\bin” directory.
  • Click “OK” to close all dialog boxes.

How do verify?

  • Open a new Command Prompt.

  • Run the following command to check the GCC version:

     g++ --version
    
  • You should see the version information for GCC, confirming that it is installed correctly.

Questions? : Reach Out