#include <stdio.h>
#include <conio.h>
#include "stdafx.h"//后来添加的
int main()
{..........}
这个程序是一个类似于命令窗口的程序.我想在程序中添加对文件操作的类 CFile.于是我在上面的程序添加#include "stdafx.h",没有添加其他代码.然后编译出现错误.
fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix).
#include <conio.h>
#include "stdafx.h"//后来添加的
int main()
{..........}
这个程序是一个类似于命令窗口的程序.我想在程序中添加对文件操作的类 CFile.于是我在上面的程序添加#include "stdafx.h",没有添加其他代码.然后编译出现错误.
fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix).
解决方案 »
- 关于strcpy_s的问题
- 求救:用DirectShow播放视频的时候,播放视频没有图像,拖动窗体后就有图像。
- 为什么有的工程正常运行后没有在release或debug文件夹里生成exe文件?
- listbox的GetText使用问题
- 谁有可编译的MP3编码源代码(一般算法)?100分相送!!!
- 怎么学好C++?
- ------请问 msafd.dll 和 rsvpsp.dll 这两个动态库是起什么作用的???------
- 不可能完成的任务!!richiedit 中介乱码问题!!
- the application has request a runtime to terminate it in anusual way数据库连接
- 急啊,编译链接通不过。系统自己加的呀!急呀急呀!
- 请教问题:手动添加的类怎样才能在类向导中显示出来
- 如何动态给工具条加按钮并且设置tooltip
由程序中的 #error 指令生成。例如:
// C1189.cpp
#undef _WIN32#if !defined(_WIN32)
#error _WIN32 must be defined // C1189
#endifint main() {
return 0;
}
如果使用 /robust MIDL 编译器选项生成 ATL 项目,也有可能看到此错误。/robust 仅用于为 Windows 2000 或更高版本的计算机生成。因此,要么移除 /robust,要么将 dlldatax.c 文件中的此行:
#define _WIN32_WINNT 0x0400 //for WinNT 4.0 or Win95 with DCOM
更改为
#define _WIN32_WINNT 0x0500 //for WinNT 4.0 or Win95 with DCOM