引入<afx.h>

此时会出现如下错误:

#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
#endif

修改项目属性,把  “MFC的使用”项改成“在共享 DLL 中使用 MFC” ,并把stdafx.h中的#include <windows.h>注释掉。

相关文章:

  • 2021-12-06
  • 2021-12-06
  • 2022-12-23
  • 2021-11-25
  • 2022-03-14
  • 2021-12-24
  • 2021-06-08
  • 2021-07-31
猜你喜欢
  • 2021-10-25
  • 2021-10-29
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案