Article ID: 958148 - Last Review: September 25, 2008 - Revision: 1.0

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

Source: Microsoft Support

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.

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.

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.

Cause

This is a known issue in the project conversion modules.

Resolution

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

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.

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.

Keywords: 
kbnomt kbrapidpub KB958148

Note: This article is from Microsoft Knowledage Base


How we have helped PC users like you

In the News: Read More In ...

Related problems posted by other users

more...