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 the shared DLL 3. Use the first type of MFC in the static library 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 when running on the colleague's machine, an error may occur: "The program cannot be started ......, 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. You don't need to worry about the size and efficiency. You can use other tools such as spy in later packaging, to detect the DLL. Http://blog.csdn.net/xiexievv/article/details/6314874)
"Using MFC in shared DLL" means that the content of some mfc dll files is not hardcoded into the EXE files during packaging, so the EXE files are small, however, related DLL files must be included in the running system environment.
"Using MFC in a static library" is to hard encode the relevant code in the Lib static library corresponding to the DLL to the EXE file, the file is large, but it can run on a machine that has not been included in the DLL. Of course, even so, not all the DLL files will be hardcoded into the EXE, so some DLL files are still required. for example, some DLL in the redistributable package.
The executable files compiled in the static library can be run on other machines. The executable files compiled in the shared dll can be run on the local machine, if it is obtained from other machines, the corresponding dynamic library is required.
In addition, the project size under the shared dll will be slightly smaller, but when running on another machine, make sure that there is dynamic library support on that machine.