This section explains the correspondence between projects and makefiles. This process is relatively automatic. If you do nothing out of the ordinary, you will never have to modify its default operation.
Most programmers encounter situations that require customized build options. Read this section to understand how the utilities work with PWB. You can return to this material when you have special requirements that are not handled by PWB's default build rules.
Figure 3.2 illustrates the PWB build process.
When you save your project by choosing the Save button in the Edit Project dialog box, PWB uses the list of files along with the rules in the selected project template to scan for dependencies and write the project makefile.
When you choose the Build or Rebuild All command from the Project menu, PWB releases as much memory as possible and passes the makefile to NMAKE, which builds the project.
NMAKE stops at the end of the first build step that produces an error (as opposed to a warning) or at the end of a successful build. In either case, NMAKE returns the results of the build to PWB along with a log of any errors and warnings. For more information about NMAKE, see Chapter 18, “Managing Projects with NMAKE.”
PWB saves the output of the build for you to view in the Build Results window or to step through when you choose the Next Error (SHIFT+F3), Previous Error (SHIFT+F4), and Goto Error commands on the Project menu. You can run the program, set program arguments, and debug the program by choosing commands in the Run menu.
If you have turned on the generation of browser information, PWB builds the browser database when you build the program. Once you have a browser database, you can use the commands in the Browse menu to navigate your program's source files and examine the structure of your program. For more information, see “Using the Source Browser”.