Configuring Borland C++ 5.5

Before proceeding to this step to configure Borland C++ 5.5, refer to BCC5 installation guide, after it's done, follow these steps...

Before you can use the compiler you need to configure the tools for your machine. This process requires you to tell the operating system (Windows) where the executable files are, and to tell the compiler where the include and library files are located. You'll also need to tell the compiler if you want to pass any special switches.

To configure the tools we'll write one batch (BAT) file and two CFG files. This assumes you are using Windows 95/98. If you are using NT, W2K, or XP, you can write a CMD file instead of a BAT file, but a BAT file will work as well.

We'll start by writing batch file to configure the environment:
  1. Use any plain text editor to write the batch file. You could use Notepad to accomplish this task.

  2. Before you make any changes, save the empty file as StartBC.bat in the C:\BCC55 directory. If you are running Windows NT or W2K, save the file as StartBC.cmd instead. Be sure you put quotes around the file name when you save it, oterwise Notepad will save your file as StartBC.bat.txt.

  3. Add the following two lines to your batch file, and then save it again.
    PATH=C:\BCC55\BIN;%PATH%
    DOSKEY /INSERT

Now let's configure the compiler by editing file bcc32.dll:
  1. Use any plain text editor (such Notepad) to edit the config file.

  2. Before you make any changes, save the empty file as bcc32.cfg in the C:\BCC55\BIN directory. Note that this is not the same directory where you saved StartBC.bat.
    Note: Be sure you put quotes around the file name when you save it, or else Notepad will save your file as bcc32.cfg.txt, which won't work at all.

  3. Add the following lines to your file, and then save it again. Note, however, that if you've installed the compiler in a directory other than C:\BC55\BIN, you'll need to adjust the lines so that they reflect the actual location of the compiler's include and library files.

    -I "C:\BCC55\INCLUDE"
    -L "C:\BCC55\LIB;C:\BCC55\LIB\PSDK"
    -P
    -v-
    -w
    -DWINVER=0x0400
    -D_WIN32_WINNT=0x0400


    For your information, each of these lines means:
    -I : tells the compiler where to look for system include files
    -L : tells the compiler where to look for libraries
    -P : tells the compiler to compile using C++, even if the source ends with .c
    -v-: tells the compiler to turn off debugging.
    -w : tells the compiler to issue warnings
    -D : defines several constants so your executables will work with W95/98/NT
    Note that the I, L, P, and D are uppercase, while the v and w are lowercase. This is important, because if you use an uppercase W, you generate a Windows application instead of warnings.
Next step is to configure the linker by editing file ilink32.cfg:
  1. Use any plain text editor (such Notepad) to edit the config file.

  2. Before you make any changes, save the empty file as ilink32.cfg in the C:\BCC55\BIN directory. Note that this is not the same directory where you saved StartBC.bat.
    Note: Be sure you put quotes around the file name when you save it, or else Notepad will save your file as ilink32.cfg.txt, which won't work at all.

  3. Add the following lines to your file, and then save it again. Note, however, that if you've installed the compiler in a directory other than C:\BC55\BIN, you'll need to adjust the lines so that they reflect the actual location of the compiler's include and library files.

    -v-
    -x
    -L "C:\BCC55\LIB;C:\BCC55\LIB\PSDK"


    For your information, each of these lines means:
    -L : tells the linker where to look for libraries
    -v-: tells the linker to turn off debugging.
    -x : tells the linker not to generate a map file
    Note that the L are uppercase, while the v and x are lowercase.

Installing Borland C++ Compiler

Once you have downloaded the compiler, you will need to install and configure it. follow these step by step guide to easily installing Borland C++ Compiler v5.5.1 (BCC 5.5 is available for free download from Borland site).

The procedures that follow assume that you will install the command-line tools in a directory named C:\BCC55. If you want to install somewhere else, simply change the path when following these instructions.
  1. Use Windows Explorer to find the file you just downloaded. This is a self-extracting file, so you won't need Zip utility such WinZip to install the tools.

    Simply execute the installation program by double-clicking the file from Windows Explorer.

  2. Double-click the file FreeCommand LineTools.exeFreeCommandLineTools.exe. This will launch the InstallShield installation program. When the first screen pops up, just click Next...

    Screenshots of BCC 5.5 installation steps
    The next screen is the license screen. Read through the license and then click "I Agree".
    The next screen asks you to enter the name for the Installation Folder. There's nothing really wrong with the default (C:\Borland\BCC55), but I've shortened it to C:\BCC55 as previously mentioned.

  3. Unless you are reinstalling, the folder you specified will not exist. Answer Yes when asked if you want to create it. Once you click OK, the installation program will uncompress each of the files and place them in the directory you specified. As it works, it will keep you updated with a progress dialog like snapshot image to the right.

    Click OK to create folder, and the installation process will begin
  4. Once it has uncompressed all of the files, the installer will inform you that "The package has been delivered successfully". Click OK to finish installation.
See also: Configuring Borland C++ Compiler