Can VS2008 be configured to build using older VC ++ compilers?

We are using VS2008 editorial and TFS for registration / registration, change management, etc. for C # WinForms and ASP.Net projects (plus we have previous versions of Visual Studio up to version 6).

We just inherited an MFC application based on VC ++ version 6. Migrating it to a later version of the VC ++ compiler (as well as Visual Studio and Windows) is not on cards yet. Target binaries must run on NT 4, 2000 and XP (yes, NT).

Just for fun, we only tried direct switching from VC ++ 6 to VS 2003, but the MFC libraries have changed enough to throw millions of warnings and errors.

In addition to cleaning up in C ++ and MFC (it was a while), we need to figure out how to put it in our environment. Ideally, we would like to create an application in the VS2008 IDE to use change management and TFS workflows, but VS2008 uses version 6 compiler libraries and MFC libraries. Is it possible? Can Visual Studio 2008 build against earlier versions of C ++ and MFC compilers, or do we support this application in VC ++ version 6 using SourceSafe?

+2


source to share


2 answers


Yes it is possible. The trick is to set up the environment for the old version and then launch VS2008 instructing it to use the current environment.

This is the batch file I used to run VS2008 and compiled with VC 6:



call "d:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
start "" "D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /useenv

      

+2


source


I'm not sure about replacing the compiler as such, but you can change the target folders to include so that the new compiler will reference the old .lib and .h files. This should pretty much take care of compatibility issues.

You can find all these configuration options in the project settings.

UPDATE



It seems that you can change the compiler executable as well as library files and include files. Find the following setting in the project settings:

  • Location of library files (.lib files)
  • Include file locations (.h files)
  • Location of executables (must be changed to point to VC ++ 6.0 compiler and linker location)
0


source







All Articles