The application cannot be started because of incorrect application configuration. "-- cause and Solution

Source: Internet
Author: User
Tags vc runtime

The application cannot be started because of incorrect application configuration. "-- cause and Solution

Http://moogge.spaces.live.com/blog/cns! Ab9b00d806d52aed! 245. Entry


Problem description:

When running a program compiled by VC 2005, an error message is displayed, "The program cannot be started due to incorrect application configuration. This error may be corrected when you reinstall the application"

Solution:

Installing vcredist_x86.exe on the target machine can solve this problem. This file can be downloaded from the msdn website.
Http://www.microsoft.com/downloads/details.aspx? Familyid = 32bc1bee-a3f9-4c13-9c99-220b62a191ee & displaylang = en
For 64-bit machines, use x64 and IA64

Cause:

It is generally believed that if the compiled content of vc2005 uses ATL or MFC, it must be atl80.dll or msmfc80.dll, which I thought at the beginning, I put the two files in the path where they can be found. Therefore, it is okay to use depends.
However
In fact, starting from vc2005, (maybe 2003, but I have never used it) These DLL are not directly loaded into the process as in the previous program. View % SystemRoot %/
Winsxs will find many similar to x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_x-
Ww_6e805841 Directory, which contains atl80.dll and msmfc80.dll. Then in manifests
The corresponding manifests is in the directory: x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_x.
-Ww_6e805841.manifest

This is a change in vc8. The program compiled by vc8 loads the dynamic library (CRT, MFC, ATL
In a global database. To avoid DLL
Put the dynamic library in the same directory as the program. Winsxs is the global library, and the corresponding manifest of the DLL is also required before loading.

I am not very clear why manifest is required for DLL loading. The program manager Martyn Lovell of Visual C ++ 2005 mentioned in his blog the reason for doing so, but so far there is no following :(

Currently, it is known that the DLL needs manifest to be loaded, and the dynamic library without manifest will not be loaded even if it is placed under path. Vcredist_x86.exe will help you put manifest and DLL in the correct place.

Refer:

Redistribution of VC ++ files (vc80)
Http://msdn2.microsoft.com/en-us/library/ms235299 (vs.80). aspx

Why vc8 uses winsxs:
Martyn Lovell's blog


VC ++ 2005 console program error: due to incorrect application configuration, the application failed to start and re-installed
Author: NLP Source: China self-learning Programming Network collection and sorting Release Date:

When I use VC ++ 2005 to write a console program today, I am prompted for an error.

"Because the application configuration is incorrect and the application cannot be started, re-installing the application may correct this problem"

Below is

I checked it online and said it was possible that Microsoft Visual C ++ 2005 SP1 redistributable package (x86) was not installed. This is easy to handle. I directly got one from the MS website and restarted, not yet.

I tried the release version, which can be used. I have a lot of debugging information in debug. Is it related to these libraries?

Msvcm80d. dll
Msvcp80d. dll
Msvcr80d. dll
Microsoft. vc80.debugcrt. manifest

To link an application to these libraries, you can

Project-> properties-> Configuration properties-> General-> Use of MFC, select "use MFC in static library"
Run, everything is OK,

The first reuse of the 2005 console program seems to be different from vc6.0.

======================================== A running error of the vc2005 Program "Because the application configuration is incorrect, application failed to start. reinstall..."

Posting (feasible)

VC. how is the program written by net2005 absent.. NET Framework running on the machine -- Solve "because the application configuration is incorrect and the application fails to start, re-installing the application may correct this problem"

Recently, my main job in the company is to create a desktop program for the projects that the company is working on for mobile. I started with a program written in C #. Later, the company asked not to install the program. net
Framwork 2.0,
I need to change it to C ++. so later it was changed to vc2005 and program. it turns out that you can run the program without installing it. You can run the program with several DLL libraries. You know, at the beginning, it cannot run on other computers.
Line, an error will be reported when a line is run. An error in XP is shown as follows:

An error will also be reported on 2000, but he will prompt: Because XXX is missing
DLL, the program cannot be started, so I found the prompt that the missing DLL is placed in the program directory, and 2000 can be run. but it still doesn't work on XP. The above error will still be reported. I guess yes
Which DLL is missing, but I cannot find it. My colleagues also used a lot of methods to help me find the DLL used by the program. They also used a lot of good tools and found a lot of DLL, these DLL are added together, with 10
A few MB (for example). But XP still does not work. It seems that there is no way to find the DLL. Find a solution on the Internet.

Enter "the application configuration is incorrect" in Baidu and search for it. Hey hey, there are quite a few. They are all the same as me. The program written in vc2005 can be used in 2000, in XP,
I can't do it in 2003, but I found that some people asked me, and no one answered me. Sorry, I am just as unfortunate as I am. continue searching. Find a person. There are three methods available:

Recently, I wrote a console program in C ++ in vs2005 and run it on a platform without vs2005 installed:
"The system cannot execute the specified program"

If we use vc6 and vs2003, We will prompt the lack of "**. dll", but this is not prompted when we use vs2005.

Run the command line with the following prompt:
"The system cannot execute the specified program"
Double-click to run the task. The following message is displayed:
"Because the application configuration is incorrect and the application cannot be started, re-installing the application may correct this problem"

After experiment, I feel that the following two solutions are more convenient:
Method 1:
In C:/program files/Microsoft Visual Studio 8/VC/redi
The following files are found in ST/debug_nonredist/x86/Microsoft. vc80.debugcrt:

Msvcm80d. dll
Msvcp80d. dll
Msvcr80d. dll
Microsoft. vc80.debugcrt. manifest

Copy these files to the target machine and run the program in the same folder or in system32 to run the program.

For other release versions, the MFC program can copy the files in the corresponding folder under redist, And the folders are marked!

Method 2:
Modify the compilation option and change/MD or/MDD to/Mt or/MTD. In this way, the static link to the VC Runtime Library is implemented and the vc dll is no longer needed during the runtime.

Method 3:

Project-> properties-> Configuration properties-> General-> Use of MFC, select "use MFC in static library"
The generated EXE file can be run on other machines.

Method 4:

Find and resend the vcredist_xxx.exe package on your vc8installation disk and install it with your program.

I tested them one by one until the third method was successful. the second method does not know where to modify the compilation option, so it does not like the fourth method, which is directly followed by installation. net Framework 2.0 is there any difference? It is better to directly install. NET Framework 2.0.

Using the third method, after compilation, the program file will become much better, because it has statically compiled the used dll library into the program. the original size of my program is 288 KB ,:

The program generated using the third method is as large as 2.85m, as shown in:

But this size is nothing compared to so many DLL, but at runtime, I believe the occupied memory should be a little more.

If you are using vc2005 and the problem also occurs, try the above method.

Category: VC development

| Add to souzang

| Browsing (300)
| Comment (0)

Previous Article: c/s distributed communication (socket technology) next article: Packaging of installation files

Http://hi.baidu.com/can2786/blog/item/fa8a1fed9aec7ad0b31cb187.html

When you click the shortcut, the following error occurs: "the application cannot be started because the application configuration is incorrect ....
When you click the shortcut, the following error occurs: "the application cannot be started because the application configuration is incorrect. "Re-installing the application may correct this problem ." Reward points: 5-... the desktop shortcut cannot open the corresponding application ??? ...
Zhidao.baidu.com/question/19594853.html 12 K 2007-2-5-Baidu Snapshot
More results on zhidao.baidu.com

VC ++ 2005 console program error: the application is incorrectly configured ..
"Because the application configuration is incorrect and the application cannot be started, re-installing the application may correct this problem." The following is an online check, saying yes... run, everything is OK. First, use the console program of 2005. It seems that there is a difference with vc6.0. Related articles about the VC ++ 2005 console program error :...
Www.zxbc.cn/html/20080910/65505.html 18 K 2008-11-1-Baidu Snapshot
More results on www.zxbc.cn

Because the application configuration is incorrect and the program cannot be started, re-installing the application may...
The compiled MFC dynamic connection program runs normally on its own machine, and runs normally on the testing machine of the 2000 system, however, on the testing machine of the XP system, the "because the application configuration is incorrect and the program fails to be started, re-installing the application may correct this problem." This error occurs. Only dynamic connection using MFC...
Topic.csdn.net/t/20060731/09/4915878.html 12 K 2006-10-25-Baidu Snapshot
More results on topic.csdn.net

Space no. 0: "The program fails to be started due to incorrect application configuration"-cause and solution...
When the program is compiled, an error message "The program cannot be started due to incorrect application configuration. This error may be corrected if you reinstall the application" is displayed. Solution: Install vcredist_x86.exe on the target machine to solve this problem. This file can be downloaded from the msdn website. Address: http://www.microsoft.com/downloads...
Moogge.spaces.live.com/blog/cns! Ab9b00d80... 51 K-Baidu Snapshot

An error occurred while running the vc2005 program "because the application configuration is incorrect, the application...
-- Solve "because the application configuration is incorrect and the application cannot be started, re-installing the application may correct this problem" Recently my main job in the company is to do it... copy these files to the target machine and run the program in the same folder or in system32 to run the program. Other Release versions, MFC programs...
Hi.baidu.com/can2786/blog/item/fa8a1fed9a... 22 K 2008-4-3-Baidu Snapshot
More results on hi.baidu.com

Go to: Solve a running error of the vc2005 program "because the application configuration is incorrect ,...
Use the debugging statement in the VC program to parse the XML file using MSXML in the VC: Solve a running error in the vc2005 program. "the application fails to be started due to incorrect application configuration, re-installing the application may correct this problem. "VC gets the control in the default printer VC (ctreectrl, ccombobox, cfiledialog )...
Www.diybl.com/course/3_program/vc/vc_js/2... 21 k-Baidu Snapshot
More results on www.diybl.com

Failed to start because the application configuration is incorrect! -Sports music games...
Failed to start because the application configuration is incorrect! Problem description: When an application fails to be started due to incorrect configuration of the application after running the 1.1 patch on the fly 11 operating system, the system may correct this error when re-installing the application: solution: installing vcredist_x86.exe on the target machine can solve the problem...
Bbs.xunlei.com/viewthread.php? Tid = 1743719 72 K-Baidu Snapshot

The application cannot be started because the application configuration is incorrect. Installing the application again may be ..
The application cannot be started because the application configuration is incorrect. Reinstalling the application may correct this problem ■ the application fails to be started due to incorrect application configuration. Re-installing the application may correct this problem and always use the Adobe Dreamweaver CS3 green installation-free version. After the operating system is re-installed, run DW again ,...
Www.qt56.com/blog/err.html 13 K 2008-10-20-Baidu Snapshot

The application fails to start because of incorrect application configuration. Re-installing the application may...
The application cannot be started because the application configuration is incorrect. re-installing the application may correct this problem because the application configuration is incorrect and the application fails... go to the next zip version of The bitcomet homepage and use it without installing and directly extracting it. I have been using the 0.59 zip version of anti-virus software: Anti-Virus is better than anti-virus !!...
It.dahe.cn/bbs/read.php? Tid = 1030 23 K-Baidu Snapshot

Read-as-you-go speech aloud-the application fails to start due to incorrect application configuration
Due to incorrect application configuration, the application... otherwise, the program will report an error and cannot run. Not Installed in the system...
Www.zero-z.cn/freadblog/post/5.html 8 K 2008-5-13-Baidu Snapshot


1 [2] [3] [4] [5] [6] [7] [8] [9] [10] Next page

Because the application configuration is incorrect and the program cannot be started, re-installing the application may correct this problem.

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.