Upgrading from Visual C++ v7.1 (VS 2003) to Visual C++ v9 (VS 2008)
March 14th, 2008 by admin
VC6
Our are written primarily in . We started with Visual C++ 6.0 back in 1998 and used it successfully for many years.
VC7
There was quite a bit of disappointment among C++ developers with the release of Visual Studio .NET (VC7) in 2002 and VS .NET 2003 (VC7.1) the following year because of so much emphasis placed on the new and VB.NET and C# languages. But with some trepidation and a moderate amount of pain, we finally migrated to VC7.1 in mid-2005. Other than some quirks in the resource editor that we managed to work around, that version worked well for us (with the requisite additions of and add-ins). It brought much-needed improvements to standards compliance, some library improvements, and was fairly stable, although compilation was a little slower and the executables slightly larger than VC6.
VC8
In early 2007, we experimented with upgrading to (VC8) but ran into a lot of problems attempting to get everything to compile and link properly. Microsoft also made some changes to how LIB files are handled, and one third-party library we use did not offer a VC8-compatible library at the time, so we shelved the conversion.
With Microsoft readying the release of (VC9) and the availability of VC8-compatible third-party libraries, we decided it was time to attempt migrating one more time. We thought it would be easier to convert to VC8 first and then try VC9 after that, but boy did that turn out to be a poor assumption.
VC8 didn’t do a great job of converting our project and solution files, requiring manual correction (Build checkboxes in the Configuration Manager and dependencies getting dropped). We also ran into several compilation and linker issues to work through, including:
Thanks to ’s built-in support for all Visual Studio releases, updating our builds was painless (only needing to append ‘|Win32′ to the solution configuration names).
Once we finally got everything to compile and link, we ran into several runtime problems and had to make some more changes, primarily:
Most problems were identified quickly and corrected in the debug build, but even with these changes, we ran into two show-stoppers:
VC9
We were about to give up and stick with VC7.1, but as a last-ditch effort, we decided to try migrating everything to VC9. We encountered a few more compilation issues:
After these changes, low and behold, we found that everything worked just great! No more crashing of the compiler when building in the IDE, and no more problems running our application on Windows 2000. Our executables are larger still (about 10%), which is acceptable considering all the improvements that have been added to make the code more secure in our connected world.
It’s apparent that Microsoft has really put significant effort into improving their C++ tool chain with this release of Visual Studio, and there are many great IDE improvements as well:
One caveat that bit us: Visual Studio 2008 requires Windows XP or later, and our build boxes were all Windows 2000, so we had to reconstruct the build machines. There is also a quirk with the Visual Studio 2008 — it doesn’t install cl.exe and some ancillary files unless you perform a full installation.
Overall, it took longer than expected to complete the migration, but fortunately it turned out to be worthwhile in the end.
Posted in Power tools |




