How to Install the MinGW Tools for C/C++

Rose-Hulman Institute of Technology –
Computer Science & Software Engineering

Overview

Follow these directions to the MinGW tools for developing code in C/C++. (The 2007-2008 freshmen laptops came with MinGW already installed.)

Install the MinGW Tools for C/C++

  1. Log in to your regular user account.
  2. Unzip this zipped MinGW folder to C:\Program Files.
  3. Add the MinGW folder to your Windows Path variable. To do this:
    1. Right-click on My Computer and select Properties.
    2. Choose the Advanced tab and click Environment Variables.
    3. Under System Variables, scroll down and select Path, then click Edit.
    4. Carefully (we suggest using the right arrow key) go all the way to the right of the Variable value field.
    5. Add to the end of that field (include the semicolon)

      ;C:\Program Files\MinGW\bin

      (This assumes that MinGW was installed under Program Files in C:. If you installed it elsewhere, substitute the correct path to its bin folder.)

    6. Click OK three times to exit.
  4. Next, verify that the MinGW install was successful. Here’s how:
    1. Click Start → Run…
    2. Enter cmd and click OK
    3. In the window that appears, enter gcc and press the Enter key.
    4. You should get a response gcc: no input files. This means that Windows could find the gcc program, which is what we want. If you get any other response, then verify that you set the path correctly in step 3e above. (For the curious, gcc stands for Gnu C Compiler.)