Search code examples
c++visual-c++visual-studio-2005

Converting VC++ 6.0 to VC++ 2005


I have converted a C++ program written for VC++ 6.0 to VC++ 2005 with Visual Studio 2005.

This raises a lot of errors because VC++ 2005 is somehow more "strict" than 6.0.

There are two possible solutions I can think of, but I don't know if it is possible.

Is it possible to change the level of "strictness" in VS2005, so the application can be compiled with VC++ 2005?

When developing a .NET-application it is possible to change the .NET-framework version for a specific application. Is this possible in for VC++ (Switching from 2005 to 6.0 after I have upgraded the solution)?

I am new to VC++, so I'm "Learning while Programming".


Solution

  • VS 2005 does not let you "compile as" an older compiler version. VS 2012 allows you to compile as VS 2010, but that is the first time VS has had such a feature.

    If you want to upgrade a project to VS 2005, you will have to just bite the bullet and fix the problems. But that's a good thing! In my experience the "stricter" compiler really has pointed bugs in the original code.

    While you're going through the pain of upgrading your compiler, you should jump to the latest (VS 2012) if that's an option.


    Aside: In .NET you are targeting a particular .NET version, because the end user may have a different .NET version installed on their computer. But with C++, you are "targeting" x86 or x64, not a particular compiler.