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;.

Installing BCX

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

The official BCX distribution package includes examples for Windows GUI, console, dynamic libraries, complete documentation, the BASIC to C translator, and several utilities including a text editor with syntax highlighting.

To get the latest bleeding-edge BCX tools and help files, visit the Yahoo! BCX Discussion Forum. You will need a Yahoo! account and you must be a member of the BCX group to access the files section.
  1. Download and run the BCX installer.
  2. Click the Next > button.
  3. Click the Next > button.
  4. Choose the destination folder, then click the Next > button.
  5. Select Full installation, then click the Next > button.
  6. Click the Next > button.
  7. Click the Next > button.
  8. Click the Install button.
  9. If you do not have LCC-Win32 installed, you may get the error below. You can safely ignore this error and click the OK button.
  10. Click the Finish button.
  11. If you chose to Launch BCX - The Free BASIC To C Translator option, you will see the BCX icon in the system tray. This has shortcuts to various BCX utilities.
  12. Download the BCX 6.8.3 update from the Yahoo! BCX Discussion Forum files section. Extract the BCX683.ZIP file and save the file BC.EXE as C:\Program Files\BCX\Bin\BC.EXE.
  13. Download the BCX Help 6.8.3 update from the Yahoo! BCX Discussion Forum files section. Save the file BCXHelp.chm as C:\Program Files\BCX\Bin\BCXHelp.chm.
  14. Download the Bldbat 3.0.0 update from the Yahoo! BCX Discussion Forum files section. Extract the bld_bat-3.0.0.zip file and save the files BLDBAT.EXE, BSTART.EXE, FTOOL.EXE to C:\Program Files\BCX\Bin\.
  15. Run the file C:\Program Files\BCX\Bin\Bldbat.Exe.
    Note: If you are running Vista or higher with UAC, be sure to right-click Bldbat.exe and Run as administrator. This will ensure you have permission to write to the directory C:\Program Files\BCX\Bin\.
  16. Click the Finish button to generate the files BCXCON.BAT, BCXDLL.BAT, BCXGUI.BAT, PC.BAT, PCALL.BAT, PD.BAT, PDALL.BAT, PW.BAT, PWALL.BAT.

Installing Pelles C

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

Once BCX converts the BCX BASIC source code to C, it will need to be compiled using a C/C++ compiler. For this guide, we will be using the Pelles C development kit.

Pelles C is a complete development kit for Windows and Windows Mobile. It contains among other things an optimizing C compiler, a macro assembler, a linker, a resource compiler, a message compiler, a make utility and install builders for both Windows and Windows Mobile.
  1. Download and run the Pelles C 6.00 32-bit installer.
  2. Click I accept the terms in the license agreement and click the Next > button.
  3. Click the Next > button.
  4. For install type, select Normal, then click the Next > button.
  5. Choose the destination folder, select Install for all users on this computer, then click the Install > button.
  6. Click the Close button.

BCX Getting Started Guide

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

It has been over 10 years since the BCX Getting Started Guide has been updated. Instead of having to wait another 10 years for a compiled HTML Help version of the documentation, everything will be made available as posts on this website.

There will be a few tweaks here and there, but there are no new example code. Most of the references for compiling the example code will now refer to the Pelles C Compiler, which is the compiler of choice for BCX. Of course other compatible C/C++ compilers can be used as well, such as the Borland C++ Compiler, Microsoft Visual C++, or LCC-Win32.

Once the guide has been completely updated, a compiled HTML Help version will be made available.