![]() What you need to do is tell the compiler you want to depend on the newest versions of the libraries. In fact, it crashes your application when run on a “clean” system. Once you install Service Pack 1 you get the newer libraries in the folder C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86, but the manifest in your own binary still demands the original library versions. In the case of Visual Studio 2008 these are the versions of the pre-SP1 libraries. ![]() The versions listed in the manifest are the initial versions installed on your development machine, though. Your executable’s manifest (incorporated into your EXE file as a resource) lists the versions of the runtime libraries it requires. Redistribute/install your application like this. ![]() Copy these folders to you application’s binary folder, for example: C:\MyAppFolder\Application.exe In many cases, when using the runtime and MFC you need and. Locate the appropriate folders in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\ (or AMD64 if you build a 64-bit version). And you need not worry about calling VC_Redist from your setup. Some of its advantages are that you can run the program from any location, even a network share, without installing parts of it to the user’s SxS folder first. In this article I focus on the “private assembly” method where the libraries are stored in your application’s directory. There are three ways to install the libraries on target computers. If you create a C project in Visual Studio and configure it to “Use MFC in a Shared DLL” (the default) you need to make sure the C runtime (CRT) and the MFC libraries are installed in the correct versions on the end user’s computer.
0 Comments
Leave a Reply. |