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.

No comments: