This article shows you how to change the default compiler options.
How to Set Compiler Options
- Open your project in Visual C++ .NET or Visual C++ 2005.
- To display the project's Properties dialog box, either click Properties on the Project menu or right-click the project in Solution Viewer and then click Properties on the shortcut menu.
- Under Configuration Properties, expand the C/C++ folder. Select the category of properties that you want to change. In the right pane, click to select the option that you want to change. A drop-down list box appears when you click the option. From the list, click to select the value that you want to assign to the option.NOTE: In some cases, you may want to change the option to a value that does not appear in the list. To do this, change the value for the option to No, and then click the Command Line category in the C/C++ folder. Type the value that you want in the Additional Options text box.
As an example, consider that you want to change the value for the Enable C++ Exceptions option under Code Generation to /EHs. By default, the value for this flag is /EHsc. The only other option in the drop-down list box for Enable C++ Exceptions is No. To change the value to /EHs:
- Click No in the drop-down list for the Enable C++ Exceptions option.
- Select the Command Line category in the C/C++ folder, and then type /EHs in the Additional Options text box.
- Click Apply, and then click OK. This new value for the option will be applied when you build your application.
To confirm that your new setting has taken effect, view the build log file (Project Directory\Debug\project name.plg). A hyperlink to this file appears in the Output window when you build the project.
See the Help topic Setting Compiler Options. To find it, type the topic name in the Search tool and limit the search to Titles Only.
Article ID: 311065 - Last Review: Dec 30, 2005 - Revision: 1