Today, I started a program. After writing it, I packed it and tested it for a friend. My friend said that I couldn't open it. The prompt was: The MFC42D. DLL was not found, so the application could not be started. The problem may be fixed when you reinstall the application. The error message is that the solution has not been found for a long time. I went to Baidu to ask. The solution is as follows:
Generally, debugging programs are generated during programming, that is, executable files under the Debug directory. Running the debug version of the exe file will dynamically connect to MFC42D. DLL and MSVCRTD. DLL files, so if you run the file on another machine and the machine does not have the two files or lacks one, the system will see: "You cannot find the required files. dll file-xx. dll. In general, the system does not carry these two files, unless it is installed with vc and so on-the fact is, I installed vc ++ 6.0 and this error occurs, I don't know if it's a problem with pirated software...
The solution is simple:
1. Select build-> Set Active Configuration from the menu, and then select Release, that is, Set up my ++ 6.0 -- configure -- select release
2. Select project-> settings. On the General tab, select Use MFC in a static Library and set static connections, that is, my ++ 6.0 project, select release on the left and MFC on the right as the static Link Library.
Solution 2: Change debug to release right-click on the toolbar and select release from the drop-down menu.