给对话框添加类, 报错 CalibrateMFCDlg.h(6) : error C2504: “CDialog”: 未定义基类 等多个错误 加上 #include "afxwin.h"  就会包如上错误 fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h> 原因: 在其它文件里 #include ”CalibateMFCDlg.h&q…
因为要用到CImage所以包含了atlimage.h 报这个错误的话你只需要把atlimage.h放在afxwin.h的下方即可,不能让它在afxwin.h的上方…
用VS2008建立一个DLL项目,一开始的时候不想用MFC, 所以选择的是使用标准Windows库. 使用了一段时间后又想用MFC了,所以把选项改成使用在共享 DLL 中使用 MFC. 但是编译的时候报错: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> 看看那么多的文件没有头绪. [解决方法] 在项目属性中,设置显示包含为是. 再次编译的时候,输出窗口…
转自VC错误:http://www.vcerror.com/?p=1388 问题描述: error C2065: "CString": 未声明的标识符 fatal error C1189: #error :  afxstr.h can only be used in MFC projects.  Use atlstr.h 解决方法: 详细的解决方法可参考VC错误:http://www.vcerror.com/?p=1388…
环境:win7,64位,vs2012 1> c:/program files/microsoft visual studio 8/vc/atlmfc/include/afx.h(24) : 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 /M…
我自己的mfc的demo要转换编译环境出现以下编译错误: VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法 在google中找到解决办法, _WIN32_WINNT这个宏对应定义的系统的版本号,如果太低的话,编译器就会认为代码无法在当前的系统上编译. 说了原因,下面是修改方法,就是在stdafx.h文件中修改相关的定义,修…
1.问题描述 vs2015 使用pg数据库的C++库文件4.0.1版本libpqxx.dll,包含头文件#include "pqxx\pqxx" 出现这个错误: fatal error C1189: #error:  "Oops: min() and/or max() are defined as preprocessor macros.  Define NOMINMAX macro before including any system headers!" 2.原…
在编译程序的时候发现报这个错误,在网上看到很多文章,说设置include路径,lib目录等等,都没有解决.最后调整了以下include文件的顺序,问题解决了.例如 从头文件a.h中截取的一段 typedef struct {     DWORD Data1;     WORD Data2;     WORD Data3;     BYTE Data4[ 8 ]; } GUID;   然后在b.cpp文件里面引用 #include <a.h> #include <Windows.h>…
转自:http://blog.csdn.net/friendan/article/details/46576699 fatal error C1189: #error :  missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS 今天使用FFMPEG出现以上错误 解决方法: 在libavutil\common.h文件头部加上以下宏定义即可: #ifdef __cplusplus#define __STDC_CONSTAN…
调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): 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…