If you open the drop-down list on the Build toolbar, you'll notice two items: Win32 Debug and Win32 Release. (The Build toolbar is not present by default, but you can choose Customize from the Tools menu to display it.) These items are targets that represent distinct sets of build options. When AppWizard generates a project, it creates two default targets with different settings. These settings are summarized in the following table.
|Option||Release Build||Debug Build|
|Source code debugging||Disabled||Enabled for both compiler and linker|
|MFC diagnostic macros||Disabled (NDEBUG defined)||Enabled (_DEBUG defined)|
|Library linkage||MFC Release library||MFC Debug libraries|
|Compiler optimization||Speed optimization (not available in Learning Edition)||No optimization (faster compile)|
You develop your application in Debug mode, and then you rebuild in Release mode prior to delivery. The Release build EXE will be smaller and faster, assuming that you have fixed all the bugs. You select the configuration from the build target window in the Build toolbar, as shown in Figure 1-2 in Chapter 1. By default, the Debug output files and intermediate files are stored in the project's Debug subdirectory; the Release files are stored in the Release subdirectory. You can change these directories on the General tab in the Project Settings dialog box.
You can create your own custom configurations if you need to by choosing Configurations from Visual C++'s Build menu.