Upgrading projects from VC2005 / VC2003 to VC2008 may not properly port /O2 switch

Upgrading projects from VC2005 / VC2003 to VC2008 may not properly port /O2 switch

Article ID : 958148
Last Review : September 25, 2008
Revision : 1.0
Source: Microsoft Support

Back to the top

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Back to the top

Action

Use the Conversion Wizard to upgrade a C++ project from Visual Studio 2005 / 2003 (with default settings) to Visual Studio 2008.  Typically, this is started by using VS 2008 to open a solution or project from an earlier version.

Back to the top

Result

The porting completes successfully and the Project Properties->Configuration Properties->C/C++->Optimization for release mode configuration will show Maximize Speed (/O2).

But when you build the application, the /O2 switch may not be not passed to the compiler. This could be observed in the build log or by checking Project Properties->Configuration Properties->C/C++-> Command Line.

As a result the VC2008-SP1-built application could perform more slowly.

Back to the top

Cause

This is a known issue in the project conversion modules.

Back to the top

Resolution

In VS2008, change the Optimization setting to anything besides Maximize Speed (/O2), click Apply, then change it back to /O2, and Apply again.

Back to the top

More Information

This happens only for projects being converted from earlier versions to VS2008.

Projects created in (rather than upgraded to) VS2008 will not have this issue.

Back to the top

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

Back to the top


APPLIES TO
• Microsoft Visual Studio 2008 Professional Edition
• Microsoft Visual Studio 2008 Standard Edition
• Microsoft Visual Studio Team System 2008 Team Suite

Back to the top

Keywords: 
kbnomt kbrapidpub KB958148

Back to the top

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image