We are migrating a project from Visual Studio 6 (I know) to Visual Studio 2010. We ran into quite a few problems having Visual Studio do the conversion for us automatically, so we had to do it manually.
Here are the command line options for both:
2006
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HCR_DLL_EXPORTS" /Fp"Release/hcr_dll.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
2010
/Zi /nologo /W4 /WX- /O2 /Oy- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "HCR_DLL_EXPORTS" /D "_WINDLL" /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fp"Release\hcr_dll.pch" /Fa"Release\" /Fo"Release\" /Fd"Release\vc100.pdb" /Gd /wd"4996" /analyze- /errorReport:queue
I went through the options for both on this page. It seems the 2010 version of compilation options enables exceptions and the VC6 version does not? Maybe that is the reason? We are going to start running some benchmarks now, but there are a lot of combinations to try, and we are not very experienced with this, so if you can look at this and see the reason immediately, I will buy you a beer in heaven.
EDIT: I understand why some might not like this question. We are currently trying to isolate the problem and come up with a specific test to show the difference. This is a giant, legacy .dll, so I was hoping maybe this was just some obvious issue that an experienced eye would catch by looking at the compilation options. If not, we will keep working away trying to isolate the problem. Thanks.
EDIT2: I apologize for the nature of this question and agree that it should be closed. We fooled around with the compilation options and came up with something that actually sped up our program by about 20% when compared to VC6. I know I should have posted specific code that demonstrates this benchmark, but we are under a tight squeeze, so we are just going to use this and not look into it anymore for now. I hope to return to this issue some time, but given our schedule here, I may not get to it. For anybody who is interested, these are the options we use now.
/Z7 /nologo /W4 /WX- /O2 /Oy- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "HCR_DLL_EXPORTS" /D "_WINDLL" /Gm- /MD /GS- /fp:precise /Zc:wchar_t /Zc:forScope /Fp"Release\hcr_dll.pch" /Fa"Release\" /Fo"Release\" /Fd"Release\vc100.pdb" /Gd /wd"4996" /analyze- /errorReport:queue
This probably will not actually help anybody b/c they have no idea of what our program is doing, but I thought I would post it nonetheless. Sorry if I have caused any one to waste a significant amount of time on this.