The build breaks after an upgrade to Visual Studio 2008 from an earlier version. This also manifests as builds not being optimized. The issue is caused by a bug in Visual Studio 2008 where it does not honor the ‘Optimization’ flag for projects that have been converted.
In Visual Studio, set the optimization of the project to “Disabled”, then switch back to the desired optimization value. When the value is shown in bold, Visual Studio will get the correct optimization.
You can also upgrade to Visual Studio 2010, which fixes this problem.
To reproduce, create a VC++ project in Visual Studio 2003 and build the Release configuration. In the BuildLog.htm file note that the compiler option is shown as /O2 (Maximize Speed). Now open and convert the project in Visual Studio 2008 and build the Release configuration. Note the absence of any optimization flag.
- Product versions: All
- OS versions: Windows