win32程序应用mfc库

引入<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>注释掉。

posted on 2013-07-01 12:59  wps712  阅读(288)  评论(0编辑  收藏  举报

导航