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 WINNT\SYSTEM32 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 WINNT\SYSTEM32 subdirectory. I put mine in the WINNT\SYSTEM directory and named them USEVC5.BAT and USEVC6.BAT. The USEVC5.BAT file would look like this:

@echo off
xcopy C:\winnt\system32\vc5-mfc\*.* c:\winnt\system32

The USEVC6.BAT file would look like this:

@echo off
xcopy C:\winnt\system32\vc6-mfc\*.* c:\winnt\system32

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 WINNT\SYSTEM32 directory to the VC6-MFC directory.



Comments

  • runtime odbc

    Posted by Legacy on 03/06/2002 12:00am

    Originally posted by: m.sivasubramanian

    respected sir,
    now i am confusing to connect the oracle data base as like as back end,and vc++ as like a front end.
    this problem is starting from when i am using single document also,
    so please help to above the problem. i am very afraid this problem because my project is depending the database connection (hospital management) .could u possible please u will explain the runtime odbc with suitable example as possible .
    i will expect ur kind email
    thank u

    Reply
  • question on vc5.0 and 6.0

    Posted by Legacy on 11/22/2001 12:00am

    Originally posted by: ywu

    I am working on a project previous built using vc5.0. Now my system only have vc6.0 installed and I need to modify one of the DLL in the project. Can I build the DLL in 6.0 and use it with the other 5.0-built DLLs and EXEs in the project?

    Reply
  • HELP: Can't go from 6.0 to 5.0

    Posted by Legacy on 05/30/2000 12:00am

    Originally posted by: John Warren

    I have a problem. I wish to take the same c++ project from
    6.0 to 5.0 and from 5.0 to 6.0. I finally sucessfully got
    the debug version to run when I built the project in 6.0. However, I cannot get the debug version to run in 5.0 even when copying the dll and pdb files that were listed. I KNOW the vc5 and vc6 version are right and different. I have rebooted, rebuilt every thing, etc. HELP please with a procedure to go from 5.0 to 6.0, build and have no ordinal problems when running debug. Then do the same thing but go from 6.0 to 5.0.

    John

    Reply
  • I don't have much problems with VC 5 and 6 in my NT Workstation

    Posted by Legacy on 11/18/1999 12:00am

    Originally posted by: Luis Juli�n Dom�nguez P�rez

    I have an Intel Pentium MMX 200 64MB and NT 4 SP5 at work, and I have installed Visual C++5 Professional, and VC++ 6 Learn Edition, and work properly.

    They have 2 independent Folders, DevStudio(5) and Microsoft Visual Studio(6), and they appear to work well.

    I have at home VC++ 5, but I can't BuildExecute Default Debug configuration of certains proyects at work bringed from home(win95-VC5), even there is problem when translating from 5 to 6. They seem to be cases with no relation between them.

    Reply
  • Thanks

    Posted by Legacy on 06/01/1999 12:00am

    Originally posted by: Teena

    Thanks for the suggestion. It worked for me and also
    saved me a lot of time.

    Reply
  • Don't forget the UNICODE DLL's!!

    Posted by Legacy on 11/11/1998 12:00am

    Originally posted by: Alexander Keck

    If you don't like surprises don't forget for the UNICODE stuff!

    The following files must be added if you use UNICODE MFC:

    MFC42UD.DLL
    MFCD42UD.DLL
    MFCO42UD.DLL
    MFCN42UD.DLL
    MFC42UD.PDB
    MFCD42UD.PDB
    MFCO42UD.PDB
    MFCN42UD.PDB

    cu!

    Reply
  • VC5 and VC6 together

    Posted by Legacy on 11/07/1998 12:00am

    Originally posted by: Hans Wedemeyer

    Your suggestion sounds ok, but I have one question..

    This works, because the debug versions on the dll should be removed from
    memory after VC6 or VC5 are shut down.

    Why not include the startup of VC5 and VC6 in each batch file, that way
    it should be even more transparent !

    Do you ever have to reboot becasue a dll did not get removed from
    memory ?

    Another Question:-

    Just how did you install VC5 and VC6 ?

    I have a directory Devstudio/VC ( Currently for VC5 )

    and how do you change the environment variables ?

    regards
    Hans Wedemeyer

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • With the average hard drive now averaging one terabyte in size, the fallout from the explosion of user-created data has become an overwhelming volume of potential evidence that law-enforcement and corporate investigators spend countless hours examining. Join Us and SANS' Rob Lee for our 45-minute webinar, A Triage and Collection Strategy for Time-Sensitive Investigations, will demonstrate how to: Identify the folders and files that often contain key insights Reduce the time spent sifting through content by …

Most Popular Programming Stories

More for Developers

RSS Feeds