Setting Up Your Path For GCC In Windows XP

Note: Although the following directions are Windows XP–specific, you should be able to apply these directions to modify your path in Windows 2000.

You might want to print this tutorial before proceeding.

If Bloodshed's Dev C++ was successfully installed on your machine, then a folder called bin (short for binaries) should have been created within the Dev-Cpp folder. (The command line programs you'll need to compile your c source code resides in bin.) Make note of your system's path to the bin folder. On my system, for example, the bin folder's path is C:\Dev-Cpp\bin

Step 1

Right-click on the "My Computer" icon.
Image of My Computer | Right-click

Step 2

Left-click on the "Properties" tab at the bottom of the menu.
Image of My Computer | Properties

Step 3

You're now in "System Properties." Click the "Advanced" tab, which is the fourth tab in the bottom row of tabs. Image of System Properties

Step 4

Now click on the "Environment Variables" button above the "OK" button at the bottom of the dialog box. Image of System Properties | Advanced

Step 5

In the "System variables" section below, you should have two columns titled "Variable" and "Value." A row titled "Path" should appear beneath "Variable." (You might have to scroll down to find it, depending on how many entries your computer has here.) Click on it, which will highlight the entry.

Now click the "Edit" button between the "New" and "Delete" buttons in the "System Variables" section. Image of Environment Variables

Step 6

To the right of the "Variable value" field, inside a text box, you should have a bunch of characters including one or more semi–colons. (The semi–colon is the path separator in Windows, and thus delineates the end of one path entry from the beginning of another.) This is the text field you need to edit. Click inside this text box to make it active.
Image of System Variable (before modification)

Step 7

Move your cursor to the end of this field and add a semi–colon, then enter the path to the bin folder that you noted at the beginning of this tutorial.
Image of System Variable (after modification)

Step 8

Now click "OK", "OK", "Apply", then "OK".

Step 9

Log out of your machine, then log back in.

Step 10

Launch a command prompt window: (Start | Programs | Accessories | Command Prompt), or simply Windows key + R.

Step 11

Type gcc at the prompt, which should reply:

gcc: no input files

If this is the case, then you've modified your path successfully! Now get coding.

If the path modification didn't work, then something went wrong at some step in the tutorial. Try again. If it still doesn't work, send me e m a i l:

rvanegas at hunter dot cuny dot ee dee you