Configure Environment Variables

Note: This post is part of the BCX Getting Started Guide 3.

After you have downloaded and installed BCX and Pelles C, we can configure BCX or Pelles C to execute in any directory.

Note: In a future post we will discuss creating a Command Prompt shortcut for BCX and Pelles C development, just like the Windows SDK Command Prompt.

For Windows 95 to Windows ME users
Start your favorite text editor and open the file autoexec.bat. Normally, it is located in your root directory of your C drive. If you dual-boot, the location may be different.
Once open, modify the path and add the location of your BCX & Pelles C executables. Because I keep my executables in the C:\Program Files\BCX\bin & C:\Program Files\PellesC\Bin directory, I have my PATH set to C:\Program Files\BCX\bin;C:\Program Files\PellesC\Bin;.

It is normal to see other paths such as c:\windows\command; in your PATH variable. Now close this file and when you restart Windows, BCX and Pelles C will run in any directory.

For Windows NT or Higher Users
In Windows 2000, you will need to bring up the Environment Variables dialog, so do this by pressing down on the Windows key and then press the Pause/Break key.

Now click on the tab labeled Advanced. You should see the "Environment Variables" button. Click that and the Environment Variables dialog will appear.
There should be two frames, one for the current user and the other for the system. Modify the current user by clicking on the variable "Path". Now modify it to point to your BCX and Pelles C directory. It should look the same as the Windows 95 path above, containing the string C:\Program Files\BCX\bin;C:\Program Files\PellesC\Bin;.