#include <afx.h>

来源:互联网 发布:乐乎lofter漫画肌肉男 编辑:程序博客网 时间:2024/05/22 03:37

最近下载了一个程序,但是程序运行的时候出现了如下错误:

 fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

最后发现头文件中多了#include <afx.h>。

经查询,网上对其解释如下:

一些定义与设置,为MFC提供最基本支持,将各种松散的东西组织起来,同时为MFC 类库的后续建立 提供方便。一个最简单的 MFC 只需 afxwin.h 即可,而afxwin.h 开始就是 #include <afx.h>具体来说, afx.h 内容如下:1. 编译选项设置,还包括warning等的预设值2. 一些头文件:afxver_.h, C相关头文件,一些Win32库, 包库MFC库3. 一些基本类声明,包括CArchieve, CArchieveException, CDumpContext, CException, CFile, CFileException, CFileFind, CMemFile,   CMemoryException , CNotSupportedException, CObject, CStdioFile4 一些基本类型, 常量, 全局变量,函数,以及一些方便比较,转换的东东, 诊断函数支持, 还包括一些方便诊断的宏(由于MFC的严谨性, afx.h 中提供了大量方便其他MFC 头文件 的宏等)
参考资料:
http://zhidao.baidu.com/question/90547753.html
http://hi.baidu.com/showland/item/05aa70d8147548e6b3f777c3

 

原创粉丝点击