MinGW C++ Download and Installation Instructions (2024)

Table of Contents
MinGW Downloading Installing FAQs

Install MinGW

MinGW means Minimalist GNU for Windows: GNU is a source of open source programming tools (GNU stands for GNU is Not Unix).

In this handout you will download the files needed by GNU C++; in the next you will download a version of Eclipse that is already set up to use MinGW.

You may want to print these instructions before proceeding, so that you can refer to them while downloading and installing MinGW.Or, just keep this document in your browser.You should read each step completely before performing the action that it describes.

MinGW

Downloading

  1. Click MinGW.

    The following page will appear in your browser (from the SourceForge web site).

    MinGW C++ Download and Installation Instructions (1)

  2. Click the Download mingw-get-setup.exe(86.5 kB) link.

    This file should start downloading in your standard download folder. This file is only 85KB so it should download very quickly.

    The file should appear as

    MinGW C++ Download and Installation Instructions (2)

    Terminate the window browsing the SourceForge web site.

  3. Move this file to a more permanent location, so that you can install MinGW (and reinstall it later, if necessary).
  4. Start the Installation instructions directly below.

Installing

  1. Double-click the MinGW C++ Download and Installation Instructions (3) icon.

    The following pop-up window will appear.

    MinGW C++ Download and Installation Instructions (4)

  2. Click Run.

    The following pop-up window will appear.

    MinGW C++ Download and Installation Instructions (5)

  3. Click Install.

    The following pop-up window will appear.

    MinGW C++ Download and Installation Instructions (6)

    You can install this software anywhere, but I recommend installing it in the default directory: C:\MinGW.

  4. Click Continue.

    The following pop-up window will appear, showing the downloading progress. After about a minute, it should appear as follows.

    MinGW C++ Download and Installation Instructions (7)

  5. Click Continue.

    The following pop-up window will appear. Ensure on the left that Basic Setup is highlighted. Click the three boxes indicated below: mingw32-base, mingw32-gcc=g++, msys-base. After clicking each, select Mark for selection. This window should appear as follows.

    MinGW C++ Download and Installation Instructions (8)

  6. Terminate (click X on) the MinGW Installation Manager (I know this is weird).

    The following pop-up window should appear

    MinGW C++ Download and Installation Instructions (9)

  7. Click Review Change

    The following pop-up window should appear

    MinGW C++ Download and Installation Instructions (10)

  8. Click Apply.

    The following pop-up window will appear, showing the downloading progress.

    MinGW C++ Download and Installation Instructions (11)

    After a while (a few minutes to an hour, depending on your download speed), it should start extracting the donwloaded files. A few minutes after that, the following pop-up window should appear.

    MinGW C++ Download and Installation Instructions (12)

  9. Click Close.
  10. Edit Path so that the MinGW and MSYSM software is findable by Eclipse.
    • Click Start
    • Click Control Panel
    • Click System
    • Click Advance system settings; you will see

      MinGW C++ Download and Installation Instructions (13)

    • Click Enviroment Variables...; you will see

      MinGW C++ Download and Installation Instructions (14)

    • In the System variables (lower) part, scroll to line starting with Path and click that line.
      IMPORTANT: Even though you see a highlighted PATH in the User variables (top part) look for Path (not CLASSPATH) in the lower part to change it.
    • Click Edit...
    • Copy C:\MinGW\bin;C:\MinGW\msys\1.0\bin; (include everything from C to ;) and then paste it at the very start of the Variable Value text entry.

      When done it should look like

      MinGW C++ Download and Installation Instructions (15)

    • Click OK (3 times)
MinGW is now installed.You are now ready to install Eclipse....But it is probaby a good idea to reboot your machine first, to ensure the new path is correct.
MinGW C++ Download and Installation Instructions (2024)

FAQs

Does C++ need MinGW? ›

MinGW is a collection of tools and libraries that provide a C/C++ development environment for Windows. It includes a port of the GNU Compiler Collection (GCC), which can compile C/C++ code into native Windows executables without requiring a Unix emulation layer.

How to install GCC and G ++ in Windows? ›

How to Setup GCC Compiler for Windows
  1. Step 1: Downloading MinGW-w64. ...
  2. Step 2: Downloading Zip File. ...
  3. Step 3: Extract and Install. ...
  4. Step 4: Click Install. ...
  5. Step 5: Installation Preferences. ...
  6. Step 6: Downloading MinGW Installation Manager. ...
  7. Step 7: Choose GNU Compilers. ...
  8. Step 8: Apply Changes.
Mar 26, 2024

How to setup MinGW on Windows 11? ›

Install prerequisites
  1. Open settings.
  2. Search for Edit environment variables for your account.
  3. Choose path variable and then select edit.
  4. Select New and add the path to Mingw-w64 bin folder. ...
  5. Select OK to save the updated path.
  6. Now reopen your cmd and check if everything is good by typing:

What is MinGW for C++? ›

MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.

How to install MinGW GCC on Windows? ›

Installing C/GCC Compiler for Windows
  1. Step 1: Search MinGW C Compiler on the Web. ...
  2. Step 2: Download MinGW. ...
  3. Note: Active internet is required throughout the installation process.
  4. MinGW32-base Package. ...
  5. MinGW32-gcc-g++ Package. ...
  6. MinGW32-gcc-objc package. ...
  7. Step 7: Apply the Changes. ...
  8. Step 8: Download the Changes.
Mar 20, 2024

How do I know if I have a C++ compiler installed? ›

Check if you have a compiler installed
  1. Open a new VS Code terminal window using (Ctrl+Shift+`)
  2. Use the following command to check for the GCC compiler g++ : g++ --version. Or this command for the Clang compiler clang : clang --version.
Jul 24, 2023

How do I know if MinGW is installed? ›

After the installation of MinGW is finished. To check if it is installed or not, open Command Prompt and type g++ — version. The MinGW compiler (GCC) is not being detected by the command prompt because the environment path variable has not been set.

What is the best compiler to use for C++? ›

6 best C++ compilers
  • Visual Studio Code FREE. VS (Visual Studio) Code was formerly only available for Windows, but it is now also available for Mac and Linux as well. ...
  • Eclipse FREE version. Next on our list of best C++ compilers is Eclipse. ...
  • NetBeans FREE. ...
  • Notepad++ FREE. ...
  • CodeLite FREE. ...
  • Codeblocks FREE.
Dec 2, 2022

Why can't I install MinGW? ›

It is essential that the installation path does not contain any spaces. Therefore, you cannot install MinGW-w64 in Program Files. We recommend to create a folder mingw-w64 on your system drive (e.g., C:\mingw). Install a current version and specify win32 as thread when requested.

How to install C++ in Windows 11? ›

Install prerequisites
  1. Find the Visual Studio Installer on your computer. ...
  2. Click or tap to start the installer, and then choose "Modify"
  3. From the Workloads screen, check if "Desktop Development with C++" workload is activated and if "Windows 11 SDK" is enabled like in the following image.
  4. Choose Modify again.

Where to install C++? ›

  1. To install a C++ compiler in a Windows environment, download the Microsoft's "Visual Studio" from the Visual Studio website. This will download a full IDE, including an editor, debugger and build systems.
  2. To access your C++ compiler follow the C++ section in Visual Studio's Getting Started guide.

Does MinGW support C and C++? ›

MinGW-w64 is a compiler suite for Windows based on the GNU tool chain. It includes a GCC compiler and related tools for compiling C and C++ applications for Windows. C and C++ applications compiled with MinGW-w64 GCC can be called from MATLAB using MEX.

How to install MinGW for visual studio? ›

In the Windows search bar, type Settings to open your Windows Settings. Search for Edit environment variables for your account. In your User variables, select the Path variable and then select Edit. Select New and add the MinGW-w64 destination folder you recorded during the installation process to the list.

How to install C C++ extension? ›

You can install the C/C++ extension by searching for 'c++' in the Extensions view (Ctrl+Shift+X). Install the Microsoft Visual C++ (MSVC) compiler toolset. If you have a recent version of Visual Studio, open the Visual Studio Installer from the Windows Start menu and verify that the C++ workload is checked.

How to install G ++ for C++? ›

Installing c++/g++ on Windows
  1. Pick the drive and a folder in which you want to install g++. ...
  2. Download full.exe, an about 14 megabyte executable, to C:\full.exe by right-clicking on the link. ...
  3. Run the downloaded executable. ...
  4. Locate where the bin folder was created for the g++ installation. ...
  5. Restart your computer.

Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 6128

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.