VS2010 MFC 动态编译以静态编译发布

VS2010 c++编写的程序在别人的机子运行不了,缺少mfc100u.dll xxx100d.dll等的解决方法

解决方法:
1.将这些dll打包,和应用程序一起发布;
2.采用MFC静态编译;

 使用VS2010编译的程序在windows xp中运行时  经常会出现找不到  相关的DLL文件,我们可以使用静态编译的方法把这些运
行依赖文件打包到*.exe中来,以减少对环境的依赖。
一般可以配置一下两项:
1.Project ->Property->Configuration Properties->General->Use of MFC 选择 Use MFC in a Static Library
2.Project ->Property->Configuration Properties->C/C++->Code Generation->Runtime Library 选择Multi-threaded(/MT)

原文地址:https://www.cnblogs.com/ike_li/p/2854641.html