When the VC compiles the program, the system prompts "because the application configuration is incorrect ,......" Solution
In the following three cases, the running error is "because the application configuration is incorrect ,......" Solve the problem, including running errors of vc6.0, VC. net2003, and vc2005.
1. A running error of the vc6.0 Program
An error occurred while running the vc6.0 program "because the application configuration is incorrect ,......" When an error is prompted, it is because the shared connection library is used for program compilation. The operating system supports the MFC framework and supports the MFC *. DLL files can run normally, but there is no MFC *. DLL files may run incorrectly. You need to add the following files in the executable directory: mfc42d. DLL, mfco42d. DLL, msvcp60d. DLL, msvcrtd. four DLL files: mfc42.dll, mfco42.dll, msvcp60.dll, and msvcrt. DLL files. (These files can be found in the installation directory of the VC compiler or in the system directory)
2. A running error of the VC. net2003 Program
A running error of the VC. net2003 program "because the application configuration is incorrect ,......" When an error is prompted, it is because the shared connection library is used for program compilation. The operating system supports the MFC framework and supports the MFC *. DLL files can run normally, but there is no MFC *. DLL files may run incorrectly. You need to add the following files in the executable directory: mfc71d. DLL, mfco71d. DLL, msvcp71d. DLL, msvcrtd. four DLL files: mfc71.dll, mfco71.dll, msvcp71.dll, and msvcrt. DLL files .. (These files can be found in the installation directory of the VC compiler or in the system directory)
3. A running error of the vc2005 Program
An error occurred while running the vc2005 program. "the application fails to be started due to incorrect application configuration. reinstall the application... "VC. how is the program written by net2005 absent. net Framework running on the machine -- Solve "the application fails to start because the application configuration is incorrect, re-installing the application may correct this problem. "recently, my main job in the company was to create a desktop program for the company's projects being used 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. I thought I could run the program without installing it. I can run the program with a few DLL libraries. I know that at the beginning, I cannot run the program on other computers, and an error will be reported when I run the program, errors in XP such:
An error will also be reported on 2000. However, he will prompt that the program cannot be started because xxx dll is missing, so I found the missing DLL and put it in the program directory, you can run it in 2000. but it still doesn't work on XP, but the above error will still be reported. I guess it must be the DLL missing, but I cannot find it. My colleagues also used many methods to help me find the DLL used by the program, I also used a lot of good tools and found a lot of DLL. These DLL are added together and there are as many as 10 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, I can't do it in XP or 2003, but I found that some people asked me, and no one answered me. Sorry, I am just as unfortunate as I am. continue to find and find a person. Find a person and provide three methods, as shown below: I recently wrote a console program in C ++ in vs2005, run the following command on an uninstalled vs2005 instance:
"The system cannot execute the specified program." If vc6 and vs2003 were used, the system prompts that "**. dll" is missing, but vs2005 does not provide such a prompt. 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, we 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 copies these files to the target machine, and runs the program in the same folder as the running program or in system32. 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: Use Project-properties-configuration properties-General-MFC and select "use MFC in static library"
The generated EXE file can be run on other machines. Method 4: Find the vcredist_xxx.exe package on your vc8installation disk and install it with your program. I will test it one by one until the third method succeeds. 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 install it directly. 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, but the size of the program generated using the third method is as large as 2.85m, as shown in: But compared to so many DLL, the size is nothing. however, 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.