引入<afx.h>windows
此时会出现以下错误:app
#ifdef _DLL
#ifndef _AFXDLL
#error Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
#endif
#endifui
修改项目属性,把 “MFC的使用”项改为“在共享 DLL 中使用 MFC” ,并把stdafx.h中的#include <windows.h>注释掉。it