Migrating a big project in MFC from Visual C++ 6.0 to Visual Studio 2005

Thanh DK picture Thanh DK · Jun 4, 2010 · Viewed 8.4k times · Source

I am maintaining a big project (~250k loc, not counting code generated from idl) in Visual C++ 6.0, that uses Visibroker (VB for short) 5.2.1 (which is a CORBA implementation from Borland). Recently, the other module that communicates with my project was upgraded to VB 8.0 and I got a bunch of incompatibility issues. Since VB 5.2.1 is no longer supported while VB 8.0 does not work with Visual C++ 6.0, I am considering migrating the whole project to Visual Studio 2005. It is not a big change like total rewrite large C++ application in C#?, but only resolving all the incompatibility errors.

My question is what kind of strategy should I use to tackle this task? Anyone has done this before? Also, the problem for me is the size of the project. How much effort does it take to do this kind of migration?

FYI, the project has a frontend GUI portion in MFC and a backend CORBA portion. The two are not very well separated though.

Best regards.

Answer

Kate Gregory picture Kate Gregory · Jun 4, 2010

In theory, you can just open your old project in the new IDE and build it. In reality you will have two issues - the meta files that hold your "here are all my source files and my compiler options" and your actual code: .dsp and .dsw way back when, .sln and .vproj now. The first one may require you to wander through an upgrade process from 6.0 to 7.0 to 8.0 and if you don't want to or can't, you may need to reconstruct that by making an empty solution/project and adding your source files into it and setting your options.

Then you need to deal with any breaking changes in the libraries since you last built. I think this is likely to be the secure CRT changes and the for loop scope. The compiler will find them all for you. You won't much enjoy changing all that, but that's to be expected.

By the way, I would go all the way to VS2010, not to 2005. Buy yourself as long a period of time as possibly before you have to do this again.