Building the Program

Now that you've set your options, you can build the program. Note that the sample program contains intentional errors that you will correct.

·To start the project build:

1.From the Project menu, choose Build.

PWB tells you that your build options have changed and asks if you want to
Rebuild All.

2.Choose Yes to rebuild your entire project.

After the build is completed, PWB displays the following dialog box:

You can choose one of several actions in this dialog box:

View the complete results of the build by opening the Build Results window.

Run the program if building in DOS. You can run a DOS program right away if the build succeeds. If the build fails, you should fix the errors before you attempt to run the program.

To run a successfully built Windows program, you must return to the Program Manager and use the Run command on the File menu.

Debug the program if building in DOS. If the build succeeds but you already know the program is not producing the intended results, you can debug your DOS program using CodeView.

To debug a Windows program, you must return to the Program Manager and start CodeView for Windows from the Microsoft C/C++ Program Group.

Get Help by choosing the Help button or by pressing F1 (as in every PWB dialog box).

Cancel the dialog box. This returns you to normal editing.

Choose Cancel to dismiss the dialog box (press ESC). PWB keeps the results of the build so that you can view the build messages later or step through them to view the location of each error. The next section describes how to do this.