Configure Environment Variables

Note: This post is part of the BCX Getting Started Guide 3.
Updated 2020-03-22.


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

To do this, we will bring up the Environment Variables dialog.
  1. Click the Start button.

  2. Type advance, which will search for commands with that text.
  3. Click View advanced system settings.

  4. Click on the Advanced tab.
  5. Click on the Environment Variables button.

  6. Under System variables, click the New button.

  7. For variable name, enter BCX_ROOT.
  8. For variable value, enter C:\Program Files (x86)\BCX.
  9. Click the OK button.

  10. Click on Path.
  11. Click on the Edit button.

  12. Click the New button.
  13. Enter C:\Program Files (x86)\BCX\Bin.

  14. Click the New button.
  15. Enter C:\Program Files\PellesC\Bin.

  16. Click the OK button to close the Environment Variables window.

  17. Click the OK button to close the System Properties window.
If you did not want to modify your environment variables, you can create a batch file and a shortcut that sets the BCX environment for you.
  1. Save the contents of the script below to C:\Program Files (x86)\BCX\Bin\BcxDevCmd.bat.
  2. Right-click your Desktop.
  3. Click on New.
  4. Click on Shortcut.

  5. Click on the Browse button.

  6. Select the batch file C:\Program Files (x86)\BCX\Bin\BcxDevCmd.bat.
  7. Click the OK button.

  8. Click the Next button.

  9. Enter the name BCX SDK Environment. Feel free to call the shortcut something else.
  10. Click the Finish button.

  11. Right-click the newly created shortcut.
  12. Click on Properties.

  13. Add cmd /K in front of the target. This will start a new Command Prompt window and ensure that it does not close until you manually exit the process.
  14. Change the Start in directory to something else. I chose the My Documents folder.
  15. Click the OK button.

  16. Double-click the newly created shortcut to run. You should see a Command Prompt window appear with the title you entered in step 9.