Using VC5 and VC6 together

Many developers like myself need to use both VC5 and VC6. This is not possible using a
standard installation, given that the names of the MFC Debug DLLs are the same in both
versions. I have seen several suggestions for how to do this. The Microsoft recommended
solution is to use two different installations of the OS. I have also seen people suggest
copying the MFC DLLs to the Debug output directory for your project. These solutions are
less than ideal. What I will present here is a method that is fairly painless and does
not waste a lot of disk space.

Start by creating 2 subdirectories – one for the VC5 DLLS and one for VC6. I created mine
under the WINNTSYSTEM32 subdirectory and I named them VC5-MFC and VC6-MFC.

Next, copy the DEBUG dlls for each version to the appropriate subdirectory. If you have
already installed VC6, it will have overwritten the VC5 versions, so you will need to copy
them from the VC5 CD. The files you need to copy (for each version) are:


  • MFC42D.DLL

  • MFC42D.PDB

  • MFCD42D.DLL

  • MFCD42D.PDB

  • MFCN42D.DLL

  • MFCN42D.PDB

  • MFCO42D.DLL

  • MFCO42D.PDB

Now, create batch files to copy the correct version of the DLLs to the WINNTSYSTEM32 subdirectory.
I put mine in the WINNTSYSTEM directory and named them USEVC5.BAT and USEVC6.BAT. The USEVC5.BAT file
would look like this:



@echo off

xcopy C:winntsystem32vc5-mfc*.* c:winntsystem32



The USEVC6.BAT file would look like this:



@echo off

xcopy C:winntsystem32vc6-mfc*.* c:winntsystem32


I created a shortcut on my desktop for each of these batch files so I could quickly run the appropriate
batch file before launching a version of VC. I have been using this method for a couple of months (ever
since VC6 shipped) and it works fine – no side effects or other strange behavior to report.

Procedure for applying service packs – When applying the VC 6 Service Pack 1, or any
future service packs, be sure to run the USEVC6 batch file before applying the service pack. After
the service pack has been applied, you need to copy the DEBUG dlls again from the WINNTSYSTEM32 directory
to the VC6-MFC directory.

More by Author

Must Read