Making a project in Turbo C++

Don't be alarmed at the length of these instructions. Each step is very quick. The whole process takes less than a minute, after you've done it a couple of times. Furthermore, you can reuse most of what you've built in later assignments.

If you want even more detail, with pictures for Turbo 4.5, check here.

But be careful. Mistakes here can cause very confusing error messages later.


1. Start Borland or Turbo

Double-click on the Borland/Turbo icon or file name. The Turbo 4.5 icon looks like this.

The Borland/Turbo development environment will start.

Eventually, you'll see an empty screen with the Borland/Turbo menu bar. The Turbo 4.5 screen looks like this. The Message window may be absent.


2. Start a New Project

In Turbo 4.5, select Project -->New Project. In Borland 5.0, select File -->New -->Project.

If you want to know why you're doing this, read What's a Project?

A dialog box will appear, asking you to tell the compiler how to compile your project. These are called the Target Options.

The Turbo 4.5 dialog box looks like this.


3. Specify the Target Options

Set the Target Options as given in the table below.

Caution: Be very very careful here.

Project Path and Name

Type in your code path, followed by your project name.

Example: c:\furby\

Target Name

This should be set automatically when you enter your path and name.

Target Type

Select EasyWin

Platform

Select Windows 3.1

Target Model

Select Large

Standard Libraries

Turbo 4.5: Uncheck OWL and Class Library, check Runtime
Borland 5.0: Encheck Class Library


4. Specify the Advanced Options

Click on the Advanced Options button in Target Options dialog box.

This shows another dialog box with several checked items. You can check and uncheck these items by clicking on them.
  • The Turbo 4.5 dialog box looks like this. You don't want these settings!

Click on the items so that the following is true:

  • No source node is checked
  • .rc is unchecked
  • .def is unchecked


5. Close Target Options

Click the OK button for the Advanced Options.

Click the OK button for the Target Options.

You should now see the Project Window with your project's name in it , e.g., furby.exe.

The Project Window in Turbo 4.5 looks like this.

If the Project Window is not already showing, select Windows --> Project.


6. Add Files to your Project

6a. Add your C file(s)

Move the mouse cursor to the name of your project in the Project Window. Press and hold the right mouse button.

A pop-up menu should appear. In Turbo 4.5, it looks like this.

Select Add node from that menu.

A file dialog box should appear. In Turbo 4.5, it looks like this.

Use the file dialog box to find your directory.

Select the C file you want to compile, e.g., furby.c.

Click OK.

The C file should appear in the Project Window under the project name.

Repeat 6a for each C file you have, if you have more than one.


 

7. Run the Project

Move the mouse cursor to the name of your project. Press and hold the right mouse button.

The project pop-up menu should appear.

Select View --> Run.

You should see a dialog box showing Borland/Turbo compiling your program.

If there are no compilation errors, another dialog box should appear showing Borland/Turbo linking your program.

Finally, if there are no linking errors, your program's output should appear.

Press the return key to finish the program's execution.

Repeat View --> Run to run the program again, or simply press the lightning bolt icon along the top of the main screen.


Materials extracted from the CS A10 homepage of Northwestern Univeristy