I know its slightly daft to start a blog for a bug, but it cost me nearly a week of struggling to find, so hopefully it will help someone out :).
Visual Studio 2008SP1 does not upgrade projects correctly - it disables optimization in release mode.
The workaround is to set the "Optimization" setting in Project->Properties->Config Props->C/C++ to disabled, then back to /O2 (Maximise speed). This setting will now be bold which is how you know it is properly set.
If you get something like: -
11>e:\workspace\trunk\sirocco\main\code\networkengine\serverraknet.cpp(907) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in functionand you haven't explicitly turned off optimization with #pragma optimization( ... ), then you have the same problem as I had and your code is most likely running slowly.They say this is fixed in VS 2010, but it's something to look out for while people are still using VS 2008, especially if you are adding a dependency that has a VS2005 project file
Hope this helps some googlers.
All the best,
Ash
No comments:
Post a Comment