Precautions for releasing small software using MFC

Source: Internet
Author: User

If the debug version is released, the following issues may occur:

The mfc42d. dll is not found, so this application cannot be started. Re-installing the application may fix this problem.

Solution:

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.

The above two steps cannot be reversed... I started to reverse it, so nothing can happen...
This generates the release program. In the release directory, the executable files do not use the two nasty DLL files, which are generally used on other machines.

OK. I did it, wrote another program, and then did the experiment. The result is correct.

To create a general program, you must use the release version.

Related Article

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.