Before you build a program, you must tell PWB what sort of file to create by using the commands on the Options menu. Use the commands from the Options menu to specify:
The run-time support for your program. This is important for mixed-language program development, where you have some source files in C and some in another language. With Basic, for example, the run-time support must be Basic's run-time support.
The run-time support you choose determines the run-time libraries that are used and the types of target environments that can be supported.
Project template. The template describes in detail how PWB is to build a project for a specific type of file (.EXE, .COM, .DLL, .LIB) and the operating environment for the target file (DOS, Windows, and so on).
Either a debug or release build. Debug options normally specify low levels of optimization and the inclusion of CodeView debugging information. Release options specify higher levels of optimization and no CodeView information.
A build directory. PWB builds your object and executable files in your current directory unless you specify otherwise. (This option is reserved for projects that use explicit project files, which are described in Chapter 3.)
·To set the project template for ANNUITY1.C:
1.From the Options menu, choose Set Project Template from the Project Templates cascaded menu.
Note that the actual order of the menu items may differ from the illustration because PWB's extensions can be loaded in any order.
2.PWB displays the Set Project Template dialog box.
This dialog box typically has the entries None, C, and C++ in the run-time Support list box. If you have installed other languages, their names appear as well.
If the current run-time support is not C, you need to choose C as the run-time support, and you must also select a project template.
3.Click C, or press the DOWN ARROW key until C is highlighted.
4.Move to the Project Templates list box by clicking in the box, pressing the TAB key the appropriate number of times, or by pressing ALT+T.
5.Select DOS EXE.
6.Choose OK to set the new project template.
·To set the build options for ANNUITY1.C:
1.From the Options menu, choose Build Options.
PWB displays the Build Options dialog box.
2.Turn on Use Debug Options by clicking the option button or by pressing ALT+D.
This option tells PWB that you are building a debugging version of the program. PWB uses debug options when you build or rebuild until you use the Build Options dialog box to choose Use Release Options.
3.Choose OK.
PWB saves all the options that you specify. You don't have to respecify them each time you work on your project.
Figure 2.2 shows the three sets of options that PWB maintains for each project. Global options are used for every build. Debug options are used when Use Debug Options is turned on in the Build Options dialog box. Release options are used when Use Release Options is turned on.
You can set compiler and linker options for both types of builds by using the Language Options commands and the LINK Options command. These commands do not determine which set of options are used when you build the project. Only the Build Options command determines which set of options (debug or release) are used when you build the project or compile a file in the project.
Global options typically include settings for warning level, memory model, and language variant. These are options that do not change between debug and release versions of a project. The debug and release sets control options that differ between the two types of builds, such as the level of optimization and the inclusion of CodeView debugging information. Debug options normally specify low levels of optimization and the inclusion of debugging information. Release options usually specify high levels of optimization and no debugging information.