1、在stdafx.h文件添加 #include <afx.h> 2、编译时报错,解决办法如下: Error C1189: #error: Please use the /MD switch for _AFXDLL builds - 我自逍遥笑 - 博客园在VS 2013中编译程序时出现错误: 错误提示1: error C1189: #error : Building MFC application with /MD[d] (CRT dll versihttps://www.cnblogs.com/zwh0214/p/6048360.html