Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

Project Configurations

Visual C++ allows you to work with different build configurations for each project. As long as you are producing the same executable filename (or library), you may select from any number of configurations to determine how the project will be built. Whenever you create a new workspace in Developer Studio, two default configurations will be created for you: one for debug and one for release. The debug configuration will build in many different debugging features that will not be compiled when building release configurations.

You can select a configuration to be the default configuration used for builds from several different places, including the configuration combo box on the Build toolbar, the context menu from FileView, or the Set Active Configuration command from the Build menu. If you want to add or delete configurations, you can do so from the Configurations command from the Build menu.

Project Settings

Each configuration allows you to choose from a wide range of project settings, appropriately handled by the Project Settings dialog box, shown in Figure 1.6. The Project Settings dialog box is started from the Settings command of either the Project menu or the FileView context menu.

01fig06.gif

Figure 1.6 Project Settings dialog box.

You will notice that each of the defined configurations is listed in the Settings For combo box. It seems fairly obvious that if you selected one configuration, you would be working with the settings for that configuration. You can also look at the settings that are common to all configurations by selecting All Configurations from the combo box.

For example, if you selected the All Configurations, you would not see the Output directories on the General page. This is because each of the configurations has different set tings for these fields. If you highlighted a single configuration, you would see where the output will go. If you change any settings with All Configurations selected, you will change the settings for both projects. This can be very useful, but you should be careful and have only one configuration selected if you only want to modify one configuration or see all of the settings for a configuration—and not just the settings that two configurations have in common.

There are about a gazillion options available in the Project Settings dialog box, so the options are grouped into several pages, accessed by the tabs at the top. In addition, several pages, such as the C/C++ page shown in Figure 1.7, have drop-down menus in which you can select several different subpages.

01fig07.gif

Figure 1.7 Drop-down menu in the C/C++ Project Settings page.

It might take a while to find all the various settings, but I think you will find this much easier than trying to keep track of all of the different compiler and linker flags manually. Just remember that you might need to try changing the Category combo box to find the setting you are looking for.

Share ThisShare This

Informit Network