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. |