| Previous | Main | C & C++ Compilers | Next | Site Index | Download | Disclaimer | Privacy |


 

 

 

Using Borland C++ Builder 4.xx/5.xx

 

 

 

 

 

 

 

 

 

  • It is recommended to use the compiler that is ISO/IEC complied and install any patches or updates or Service Pack of the compiler.  The latest in this series is Borland C++ Builder 6.xx and for multiplatform compiler (Windows, Linux and Solaris) is Borland C++ BuilderX.

  • The following are steps on how to use Borland 4.xx and 5.02 through the IDE.  You can also try using the command line instructions.

  • Launch Borland C++.  Whether from the Start Program or any shortcut menu on your desktop.  The following IDE will be launched.

Borland builder C++ IDE compiler

  • Next, click File menu, select New and select Project... sub menu as shown below.

Borland builder C++ IDE compiler

   
  • The following dialog box appears.  First of all fill up your project name in Project path and Name field. You can change the default path if you want.

  • Then fill up your target name in Target Name field, as default, it is same as your project name, but you can change if you want.

  • Select Application.exe as your Target Type.

  • Select Win32 as your Platform.

Borland builder C++ IDE compiler

   
  • Click the Advanced button.  The following dialog box appears.

Borland builder C++ IDE compiler

   
  • We just want an empty project not a GUI, so clear the .rc (resource) and .def (definition) check boxes.  Then click the OK button to close the dialog box.

  • Just leave other setting as is.  Click the OK button.

  • The following window will appear.  Double click the your_filename.cpp (shown in the following is proj0002.cpp) file on the right inner windows; it will launch an editor as shown in the following windows.  If there is already an editor launched, this step can be skipped.

Borland builder C++ IDE compiler

   
  • Now you can start writing your C/C++ source code here or just copy and paste the source code from the Tutorial just to complete the compile and link process.

Borland builder C++ IDE compiler

   
  • When you have finished writing your source code, you are ready to compile and run your first program.  Select Project menu, select Compile sub menu.  The compilation will begin, if there is any error, you have to rectify the error before you can proceed to the next step, linking.  If your compilation doesn’t have any error, proceed to the Make all sub menu, then if there is no error, proceed to Build all sub menu.

  • Alternatively, you can just select the Build all (compile and link) sub menu, any error during the compilation and linking files will be shown at this stage.

  • You have to rectify any errors occurs, before you can run/execute your program.  If your Build all sub menu just generate warning, it is OK if you want to run/execute for debug version instead of release version.

Borland builder C++ IDE compiler

   
  • The result dialog box is shown below displaying the result of the program building.

Borland builder C++ IDE compiler

   
  • If there is no error during your building (compile and link) process, proceed to the program execution (run) step.  Click the Debug menu, select Run sub menu as shown below.

  • You also can directly run your program when you have finished writing your program instead using the Build all menu by directly selecting the Run menu.

Borland builder C++ IDE compiler

   
  • The following is the console output screen.  There you are!!! You have run your first C/C++ program. Congratulation.

Borland builder C++ IDE compiler console output

   
  • By experience, most of the error during compilation and linking are related to:

  • Syntax error – this mean you do not obey the rules how to write proper C/C++ code or line of code such as no semicolon, less 1 bracket etc, mostly generated by typing errors.

  • Cannot open file – mostly the include files or libraries, whether it is not available in the expected location or folder or it is user define include file or the include file is corrupted or it is non standard libraries.

  • Run time error – any error exist during the running of the program.

  • Logical error – this error means your program run smoothly, but the program output do not match the expected output.  This is the most difficult error to debug.

  • There are many errors to be mentioned here and you can check the compiler documentation as well.  It is directly proportional with your line of code.  More line of codes, you should expect more errors.

  • You ONLY will learn and be familiar with these things if you PRACTISE.

  • For advanced programming, you may want to change the setting for your project or programming environment; you can click the Options menu and select Project… or Environment…  There is a lot of setting to suit your program development.

  • The following is the Project... settings menu.

 

Borland builder C++ IDE compiler project settings

Borland builder C++ IDE compiler project settings/options

   
  • And the following is the Environment... menu.

Borland builder C++ IDE compiler environment settings

   
  • Finally, don’t forget to explore other menus as well.

 

 

 

---www.tenouk.com---

 

 

 

 

Further digging:

 

  1. Check the best selling C, C++ and Compilers at Amazon.com.

 

 

 

 

 

 

 

| Previous | Main | C & C++ Compilers | Next | Site Index | Download | Disclaimer | Privacy |