Free Borland C++ Command-Line Tools

You can download a free (and very good) compiler from Borland at http://www.borland.com/bcppbuilder/freecompiler/.

A free (and very good) debugger is available at http://www.borland.com/bcppbuilder/turbodebugger/.

  1. Run the DOS shell: Select Start->Run.
    {short description of image}
    Type command and click Ok.
    {short description of image}
    You will see a DOS shell window.
    {short description of image}
    Never seen one of these before? Congratulations—you have just reached Level 2.
  2. Type
    mkdir c:\temp
    and hit the ENTER key. If you get an error message that the directory already exists, then that's ok.
  3. Start your browser and go to http://www.borland.com/bcppbuilder/freecompiler/. Follow the annoying questionnaire and download steps.
  4. You will get a “Save As” dialog such as this one.
    {short description of image}
    Change the file name to c:\temp\setup.exe and click on Save.
  5. When your browser is done downloading the file, switch to the shell window that you opened in step 1. Then type
    c:
    cd \temp
    setup
    Follow the setup instructions.
  6. This step is for Windows 95, 98, or Millennium (ME). If you have Windows NT or 2000, go to step 7 instead.
    Return to the shell window. Type
    edit c:\autoexec.bat
    You will see an editor window, somewhat like this:
    {short description of image}
    Locate the line that starts with PATH= and insert the string
    ;c:\borland\bcc55\bin
    after the C:\WINDOWS and ;C:\WINDOWS\COMMAND statement. Check that the semicolons are correct. Do not insert a n y   a d d i t o n a l   s p a c e s ! ! !
    Now select File->Save and File->Exit. Reboot your computer. After the rebooting is complete, go to step 8.
  7. If you have Windows 95, 98 or ME, then skip this step. If you have Windows NT or 2000, then do the following:
  8. Test that the compiler is properly installed. Open up a new shell window (as described in step 1). Type
    bcc32 
    Did you get a screenful of compiler flags? Congratulations—you have just reached level 3.

Use your favorite text editor to edit your program. If you don't have a favorite, try TextPad.

Then launch the DOS shell as described previously

In the command shell, type

c:
cd \mydirectory

where mydirectory is the file that contains your program.

Then you can compile a console application like this:

bcc32 -Ic:\cccbook\cccfiles myfile.c

where cccbook is the directory into which you expanded ccc2e.zip and myfile.c is the file you wanted to compile.

Alternatively, type

bcc32 -tW -Ic:\cccbook\cccfiles myfile.c

to compile a graphical application.