Redistributing the MFC Library

If you dynamically link your application to the MFC library, you have to redistribute Msvcr100.dll because all MFC DLLs use the shared version of the C run-time library (CRT). You also have to redistribute Mfc100u.dll or Mfc100.dll.

If you statically link your application to MFC (that is, if you specify Use MFC in a Static Library on the General tab in the Property Pages dialog box), you do not have to redistribute Mfc100u.dll or Mfc100.dll. However, although static linking may work for testing and internal deployment of applications, we recommend that you do not use it to redistribute MFC. For more information about the recommended strategies for deploying Visual C++ libraries, see Choosing a Deployment Method.

If your application uses the MFC classes that implement the WebBrowser control (for example, CHtmlView Class or CHtmlEditView Class), we recommend that you also install the most current version of Microsoft Internet Explorer so that the target computer will have the most current common control files. (At a minimum, Internet Explorer 4.0 is required.) Information about how to install Internet Explorer components is available in "Article 185375: How To Create a Single EXE Install of Internet Explorer" on the Microsoft Support website.

If your application uses the MFC database classes (for example, CRecordset Class and CRecordView Class), you must redistribute ODBC and any ODBC drivers that your application uses. For more information, see Redistributing Database Support Files.

If your MFC application uses Windows Forms controls, you must redistribute mfcmifc80.dll with your application. This DLL is a strong-name-signed .NET assembly that can be redistributed with an application in its application local folder or by deploying it to the Global Assembly Cache (GAC) by using the Gacutil.exe (Global Assembly Cache Tool).

If you redistribute an MFC DLL, make sure to redistribute the retail version and not the debug version. Debug versions of the DLLs are not redistributable. The names of debug versions of the MFC DLLs end with a "d", for example, Mfc100d.dll.

If you modify MFC sources and then rebuild the MFC DLL, you must rename the modified MFC DLL so that it will not conflict with the MFC DLL that is included in Visual Studio. We recommend that you do not rebuild or rename the MFC DLL. For more information, see MFC Technical Note 33.

You can redistribute MFC by using either VCRedist_architecture.exe, merge modules that are installed with Visual Studio, or by deploying the MFC DLL to the same folder as your application. For more information about how to redistribute MFC, see Redistributing Visual C++ Files.

Installation of Localized MFC Components

If you decide to localize your application by installing an MFC localization DLL, you must use the redistributable merge files (.msm). For example, if you want to localize your application on an x86 computer, you must merge Microsoft_VC100_MFCLOC_x86.msm into the installation package for an x86 computer.

The redistributable .msm files contain the DLLs that are used for localization. There is one DLL for each supported language. The installation process installs these DLLs in the %windir%\system32\ folder on the target computer.

For more information about how to localize MFC applications, see TN057: Localization of MFC Components, and also Article 208983: How to Using MFC LOC DLLs on the Microsoft Support website.

You can redistribute MFC localization DLLs by deploying the MFC DLL in your application local folder. For more information about how to redistribute Visual C++ libraries, see Redistributing Visual C++ Files.

See Also

Concepts

Redistributing Visual C++ Files