Part 2. Modifying Configuration Options

In Part 1, you used the SmartGuides to create a simple project. You now have a configuration file for your project and one source file, main.cpp. In this part you will learn how to set or modify options for your project.

Because the SmartGuides did such a good job of helping you create your project, all the necessary options were set for you. The option you will change in this part will not have a great impact on this project. However, changing it will illustrate how easily you can change options for your project, target, or source files from within the VisualAge C++ IDE.

This section should take you approximately 15 minutes to complete. In it, you will learn to perform the following IDE tasks:

Change Your Target CPU Architecture Option

By default, the target CPU architecture is an Intel 80486 processor. In all likelihood you are running a newer processor, such as a Pentium or Pentium II processor. By changing the target CPU option, you allow VisualAge C++ to generate an executable file containing instructions that are only supported by the newer processor. In a real application, making this change might improve performance, although in this tutorial you will not notice any difference.

You can add, modify, or delete configuration options for your project in the Configuration section of the workbook. Follow these steps to specify your processor:

  1. Select the Configuration section of the workbook.
  2. Select the Options page of the Configuration section.
  3. The left-hand pane shows a Source and Targets view of the configuration, while the right-hand pane shows a Change Options view. Any options you change in the Change Options view are applied to the object selected in the Source and Targets view. Select the Target ntwbylwt.gif (227 bytes) object in the Source and Targets view.
  4. Press F6 to move to the Change Options view.
  5. There are two ways you can locate the option you want to change.
  6. Notice that the current choice, Target Intel 486 processor, is selected with a grayed radio button. This indicates that the grayed choice is the default and that the default is being used; no information for this option appears in your configuration. If you click this choice, the radio button changes to black, to indicate that this option is now explicitly set to the default 486 choice.
  7. Select the processor you are using. The text of the option you chose turns green. An option's text is displayed in green when its value, for the currently selected source or target, is set by your configuration. In other words, you have explicitly chosen a setting for this option, whether or not that setting is the default.
  8. Click Apply at the bottom of the view. This saves any option changes you have made. The next time you build your project, these changes will take effect.
  9. Select the Source view of your configuration file in the Configuration section (the rightmost button along the top of the Configuration section). You will see that gen(arch,"pentium") or gen(arch,"pentium2") is now one of the target options for your project.

You can now proceed to the next part of the tutorial: