Download and Install Borland's Free C++ compiler

Learning C++ can be easy--but the first step is to find a C++ compiler. My friends at Borland have made a free version of their C++ compiler available.

Downloading the Compiler

The first thing you need to do is use your Web Browser to go to this site 

http://www.borland.com/products/downloads/download_cbuilder.html

Once there, select the Compiler hot link as shown in the illustration below

 

You'll then be directed to this page where you'll be asked to register--don't worry, this is painless and free---I haven't received a single email from Borland since I first downloaded the compiler. Click on the New User button to begin the process.   

After clicking on the New User button, you'll be presented with this window--fill in the required information, and be sure to include the correct Country and Encoding---then click on Continue… 

 

You'll then see this window--you have no choice but to agree and click on the Submit button… 

 

Next you'll be asked to take a survey (what do you expect, this is free after all?). Complete the survey and then click on the Submit button 

 

Finally, you are to the do the License Agreement Page--read it (it’s long) and if you agree, click on the Submit button 

 

You'll then see this window---click on the freecommandLinetools.exe link to begin the download--notice that it’s 8.7 Megabytes 

Depending upon the browser you are using, you will be presented with a window that prompts you to save the compiler download to a folder--I like to save my downloads into a folder called Downloads, and a subfolder called Borland---and that's what I'm doing here…. 

 

Depending upon your modem speed, the download can take anywhere from a minute to an hour. Once you have downloaded the compiler, you'll need to install it.

Installing the Compiler

Close your browser, and use Windows Explorer to locate and execute the file you just downloaded…

When you double click on freecommandLinetools.exe you will start the installation process. You will see this window. Click on the Next button to proceed… 

You'll then be presented with this window which prompts you for a location to place the compiler---it's always a good idea to accept the default location, so unless you have a very good reason to change it, just click on the Finish button… 

  You'll then see various messages indicating that files are being 'unpacked' (installed)… 

 

In a few minutes, the installation will be done, and you should see this message--click OK and the installation is complete. 

We're not quite done yet...

In order for the compiler to work properly, we need to do two more things. By the way, these are documented in the README.TXT file which you should find in the 

C:\BORLAND\BCC55 

folder

Two mystery configuration files need to be created

First, we need to be sure that two configuration files called BCC32.CFG and LINK32.CFG are located in this folder

C:\BORLAND\BCC55\BIN

BCC32.CFG needs to contain these two lines 

-I"C:\BORLAND\BCC55\INCLUDE"
-L"C:\BORLAND\BCC55\LIB"

and LINK32.CFG file needs to contain this line

-L"C:\BORLAND\BCC55\LIB"

You have several choices here. 

You can create these files yourself, using Notepad to carefully write the lines I've included here, and then save them in the correct folder. 

You can open Notepad, then copy and paste the lines I've included here into Notepad, then save the two files in the correct folder.

Or, you can just right-click your mouse on these two file names, BCC32.CFG and LINK32.CFG --- when you do, select 'Save Target As; and save them in the correct folder.

Updating your Path to include the location of the Borland C++ compiler

The final step you need to take is to adjust your path to include the location of the C++ Compiler. 

How you do this depends on the Operating System you are using. In my August 2001 article

http://www.johnsmiley.com/cis18/august2001/August2001.htm

I illustrate how to do this on a Windows NT Server PC to include the path of the Java Development Kit. 

The process is the same for the Borland C++ compiler--you just need to be sure that the path includes a reference to this folder

C:\BORLAND\BCC55\BIN

folder.

If you are using something other than Windows NT Server, here are the myriad of ways to adjust your path...

Windows 95 or 98. You must carefully append the location of the Borland Compiler ;C:\BORLAND\BCC55\BIN ---to the exiting Path in the AUTOEXEC.BAT file. (Don't forget the semicolon!)

Windows Me. Go to the Start Menu, then choose Programs, Accessories, System Tools and System Information. A window titled "Microsoft Help and Support" should appear. Select the Tools menu, and choose the System Configuration Utility. Go to the Environment tab where you can look for the PATH to edit. Append ;C:\BORLAND\BCC55\BIN at the end of the path. (Don't forget the semicolon!) Once you have changed and saved the value, you will be prompted for reboot.

Windows NT. Go to the Start Menu, then choose Settings, Control Panel and select System. Select the Environment tab and look for User Variables and System Variables for PATH. Then edit the value and append ;C:\BORLAND\BCC55\BIN at the end (Don't forget the semicolon!)

Windows 2000. Go to the Start Menu, then choose Settings, Control Panel and select System. Select the Advanced tab and look for User Variables and System Variables for PATH. Then edit the value and append ;C:\BORLAND\BCC55\BIN at the end. (Don't forget the semicolon!)

Windows XP. Go to the Start Menu, then double click on System. In the System Control Panel select the Advanced tab and push the Environment Variables button. Now, you can look for the PATH to edit. Append ;C:\BORLAND\BCC55\BIN at the end of the path. (Don't forget the semicolon!)Once you have changed and saved the value, you will be prompted for reboot.

Compiler Documentation

You can get some basic information on the compiler you just downloaded by linking to this site

http://community.borland.com/article/0,1410,20997,00.html

Of course, the best thing to do to learn how to use the compiler is to purchase my C++ book. Learn to Program with C++ by following this link

http://www.amazon.com/exec/obidos/ASIN/0072225351/ref%3Dnosim/professorsmileys/002-2830526-2718461

Now that the compiler is installed, you're ready to create, save, compile and run your first C++ program--again, the best way to learn to do that is via my book.

Summary

I hope that this article will help you get started with C++.. If you enjoyed it, please click on the PayPal button below to contribute $1 to my Website.