The program fails to start because the application configuration is incorrect.

Source: Internet
Author: User
Problem Performance I encountered such a problem: Developed with VC ++ 2005 Program P, but it cannot run on another machine, prompting "The program failed to start due to incorrect application configuration ". Cause Analysis It may be caused by incorrect C ++ runtime or C ++ runtime versions. Although all are vc8.0, the development machine tracking program thread, found that the program P called: C: \ WINDOWS \ winsxs \ x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989 \ msvcr80.dll. The dll version is 8.0.50727.4053, and the running machine is 8.0.50727.762. Solution Download the re-release package for VC ++ 2005 running at Microsoft. After installation, the running machine can run program p. Http://www.microsoft.com/downloads/details.aspx? Familyid = 766a6af7-ec73-40ff-b072-9425bab119c2 & displaylang = ZH-CN Another idea Considering the user experience, no one is willing to perform additional installation operations before using program P. Another idea is to copy all the required DLL files to the running directory of program p. So copy msvcr80.dll to the running directory and execute the program P. The strange thing is that the problem is not solved, and the system also prompts "The program failed to start due to incorrect application configuration ". Google found that such DLL existed clearly but could not be found. This was caused by a file named manifest. To solve the DLL hell, Microsoft introduced a file with the manifest extension from the XP system, that is, a list file. The content of this type of file is an XML file that describes the dll version on which the program is running. When the program calls the DLL, first find the DLL manifest file, and then find the DLL that conforms to the manifest description. When program P wants to call msvcp80.dll, the relevant manifest file is not found, so the application configuration is incorrect. Go to the development machine vs installation directory, Microsoft Visual Studio 8 \ Vc \ redist \ x86, and find the Microsoft folder. vc80.crt. The folder contains three DLL files of VC ++ 8.0 runtime and a manifest file, and copies the manifest file to the running directory of program p. Execute Program P again. Another solution Go to the development machine vs installation directory Microsoft Visual Studio 8 \ Vc \ redist \ x86 and find the Microsoft folder. vc80.crt: Copy all the files (three DLL, one manifest) in the folder to the running directory of program p. To keep the directory clean, copy the Microsoft. vc80.crt folder directly. Note: 1. the folder name can only be "micorsoft. vc80.crt, cannot be changed to others, such as "lib" and "DLL"; 2. the name of the configuration file cannot be changed, but it can only be "micorsoft. vc80.crt. manifest "; 3. The inventory file must be in the same directory as the DLL. Review Back to the beginning of this article, we can see that the original error message really meant "I didn't find the desired DLL manifest file", instead of "I didn't find the desired DLL file ". This can also be confirmed by analyzing the changes in the system directory c: \ windows \ winsxs before and after the re-release package during the installation of VC ++ 2005. After installation, the directory will add a new directory named: x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989, which contains three C ++ runtime DLL files: msvcm80.dll, msvcp80.dll, msvcr80.dll; at the same time C: the manifests folder under \ windows \ winsxs adds two files: x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989.Manifest, x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989.cat. Here, it is clear that Microsoft has adopted double standards for itself and for others, and the configuration file and DLL file are not placed in the same directory. If you delete the first. manifest file and execute program P again, you will find that the error message at the beginning of this article appears again. So what is the real prompt for missing DLL files? Keep the manifest and delete the DLL before running it. You can see: "The application Initialization is normal (0xc0000034) failed ". Supplement Vcrt version of Visual Studio 2005 + SP1: 8.0.50727.762. Visual Studio 2005 + SP1 + VS80sp1-KB937061 + VS80sp1-KB971090 + VS80sp1-KB947738 vcrt version: 8.0.50727.4053. Because several security patches are the same fashion, we are not sure which one has upgraded the vcrt. What I can tell is that Microsoft's security vulnerabilities are huge. A patch of kb971090 has 249 MB, which reminds me of the story of a beggar who needs to pad his pants with a button.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.