Setting up the Borland 5.5 C/C++ Compiler

Find Tips and tricks on how to better use the Zeus editor. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
jussij
Site Admin
Posts: 2445
Joined: Fri Aug 13, 2004 5:10 pm

Setting up the Borland 5.5 C/C++ Compiler

Postby jussij » Tue Oct 15, 2013 4:15 am

To setup Zeus to work with the Borland 5.5 C/C++ compiler do the following.

1) Go to this page and register for the download: http://forms.embarcadero.com/forms/BCC3 ... erDownload

That registration will result in an e-mail containing a download link.

Download and install the compiler from that link.

2) The installer would have installed the software in this folder location:

Code: Select all

c:\Borland\BCC55

and the compiler and other tools are found in this folder location:

Code: Select all

c:\Borland\BCC55\Bin

That bin folder needs to be added to the PATH environment variable. To do that use the Windows Control Panel to open up the System icon and use the Environment button found in the Advanced settings to add the bin folder above to the PATH environment variable.

To test this PATH change start Zeus and use the Tools, Command Line menu and run this command:

Code: Select all

bcc32.exe

If that command generates the following output it means the PATH has not been set correctly:

Code: Select all

'bcc32.exe' is not recognized as an internal or external command, operable program or batch file.

The expected output is this:

Code: Select all

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Syntax is: BCC32 [ options ] file[s]     * = default; -x- = turn switch x off
  -3    * 80386 Instructions        -4      80486 Instructions
  -5      Pentium Instructions      -6      Pentium Pro Instructions
  -Ax     Disable extensions        -B      Compile via assembly
  -C      Allow nested comments     -Dxxx   Define macro
  -Exxx   Alternate Assembler name  -Hxxx   Use pre-compiled headers
  -Ixxx   Include files directory   -K      Default char is unsigned
  -Lxxx   Libraries directory       -M      Generate link map
  -N      Check stack overflow      -Ox     Optimizations
  -P      Force C++ compile         -R      Produce browser info
  -RT   * Generate RTTI             -S      Produce assembly output
  -Txxx   Set assembler option      -Uxxx   Undefine macro
  -Vx     Virtual table control     -X      Suppress autodep. output
  -aN     Align on N bytes          -b    * Treat enums as integers
  -c      Compile only              -d      Merge duplicate strings
  -exxx   Executable file name      -fxx    Floating point options
  -gN     Stop after N warnings     -iN     Max. identifier length
  -jN     Stop after N errors       -k    * Standard stack frame
  -lx     Set linker option         -nxxx   Output file directory
  -oxxx   Object file name          -p      Pascal calls
  -tWxxx  Create Windows app        -u    * Underscores on externs
  -v      Source level debugging    -wxxx   Warning control
  -xxxx   Exception handling        -y      Produce line number info
  -zxxx   Set segment names

3) Edit the Zeus C/C++ Document Type and in the Compiler section add this as the command line:

Code: Select all

bcc32.exe -Ic:\Borland\bcc55\include -Lc:\Borland\bcc55\Lib "$fn"

The -I and -L options tell the compile where to file the include and library folders respectively and point to the folders found in the original install folder from above.

NOTE: The command line above will create a console Windows executable. If you want to build Windows GUI executable you will need to change the command line to be:

Code: Select all

bcc32.exe -tW -Ic:\Borland\bcc55\include -Lc:\Borland\bcc55\Lib "$fn"

More documentation on other compiler command lines can be found here: http://edn.embarcadero.com/article/20997

4) Create a sample hello.cpp file as shown below:

Code: Select all

#include <stdio.h> 

int main(void)
{    
    printf("Borland C++ 5.5 Compiler Example.");    
    return 0;
}

5) Use the Compiler, Compile menu to compile that file and the resulting compile and link will produce a hello.exe file in the same directory.

6) Use the Macros, Execute 'hello.exe' menu to run that executable and you should see this output.

Code: Select all

Borland C++ 5.5 Compiler Example.

Cheers Jussi

Return to “Tutorials, Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest