Alex Rivera | Logout

Converting VC++6/Win32 project to VS2010 C++/Win32 project: Known issues

Asked 2011-03-08T13:15:54.570
11

Do you know of any resources highlighting known or possible issues during conversion of a VC++6/Win32 project to VS2010 C++/Win32 project type? I'm interested in all kinds of issues:

  • Compiler options compatibility
  • Compile-time issues
  • Link-time issues
  • Runtime issues
  • MFC issues

Otherwise, if you already performed that kind of migration, what issues have you encountered?

Thank you

Edit
Report

2 Answers

4
  1. First of all, these issues are highly dependent on code quality and how the ancient code has been adapted to fit the VC++6 compiler's "features".

  2. It's not possible to convert .dsp to the VS 2010 format directly (at least with the express editions), you'll have to pass through 2008 to be able to convert.

  3. The conversion wizards should warn and inform you of any issues there might be. I haven't been through this process, but I would think compiler switches are the least of your worries. In general, I would expect bad code to produce a lot more errors you need to worry about instead.

As to your specific queries:

  • See 3.
  • VS2010 will take longer.
  • VS2010 linker will take longer, especially if you enable link-time optimization (introduced in VS 2005)
  • only if you made non-standard assumptions or if VC++6 has non-standard functions. As long as you recompile the complete project with VS2010 (and thus link it to the latest VC(++) runtime), no runtime issues should occur.

sidenote: I'm not saying the old code is bad, just that a lot of questions on SO regarding VC++6 are caused by bad code quality/conformance.

answered 2011-03-08T13:24:14.793
2

When moving from VS2005 to VS2010, we ran into a problem with a 3rd party library causing one of our programs to crash every time it was loaded. The problem turned out to be caused by Microsoft reversing the default setting for the /NXCOMPAT switch in the linker. That switch controls whether or not Data Execution Prevention (DEP) is enabled or not. Prior to VS2010, the default setting for that switch was NO and the DLL we were using apparently relied upon that setting to function correctly.

I'm not sure how far back the NXCOMPAT linker switch goes. It wasn't listed in any of the settings available in the VS2005 dialogs but it was listed when link /help was run from the command line. I've never been able to find a list of changes such as this from Microsoft, so this kind of bug is VERY tricky to track down.

answered 2013-04-09T12:22:36.293

Your Answer