Building MFC application with/MD [d] (CRT dll version) requires MFC shared dll version ~~~~ .

Source: Internet
Author: User

From: http://www.byywee.com/page/M0/S530/530822.html

Building MFC application with/MD [d] (CRT dll version) requires MFC shared dll version ~~~~ .

 

It is easy to find a solution on the Internet. The solution is published as follows:

 

Right-click your project and choose Properties, configuration properties, and general from the shortcut menu. Then there is a "project default value" on the right side. The following shows how to use MFC, select "use MFC in shared DLL", and then OK ~~~

 

This is true, but I do not know why, so I learned about the DLL-related content of MFC. The summary is as follows:

When vs2008 is used, there is one of the following MFC settings in the project properties:

1. Use the standard Windows library

 

2. Use MFC in shared DLL

 

3. Use MFC in a static library

 

First, as the name suggests. The second type means that the content of some mfc dll files is not included in the EXE files during packaging, so the EXE files are small, but related DLL files are required in the system during running. The third is to write the relevant code in the DLL into the EXE file. The file is large, but it can be run on a machine without the relevant DLL.

 

At the same time, if the program was originally the second method, it could be sent to a colleague, and an error may occur when running the program on the colleague's machine:

 

"Cannot start the program ......, Failed to start the application because the application configuration is incorrect ."

 

I think it is better to select 3rd types of programs in the development stage.

 

After reading the above, I am going to change it to a static library to use MFC. After I modified it, I found a problem: general error c101008a: failed to save the updated manifest to the file "... the solution is also listed as follows:

 

Update files cannot be saved, that is, the remaining files are not deleted. That is, the debug folder is to be deleted. (This problem has been discussed before and some errors must be solved)

 

Solution: two methods:

 

1st methods. manually delete Debug. Note: There are two Debug Programs in vs2008 and both are to be deleted.

 

2nd Methods: automatic deletion: Under the VC ++ 6.0 compiler, build ---> clean, while under vs2008, build ---> clean solution

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.