编译出现以下错误提示,哪位大哥能指点一下啊,谢谢了!
d:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>

解决方案 »

  1.   

    把#include <windows.h>去掉
      

  2.   

    我在Find in files里搜索都已经找不到windows.h了,可编译时还有这个错误
      

  3.   

    应该是你所包含的头文件中(也就是你的include中)
    可能包含了  windows.h比如:#include <xxx.h>在这个头文件中可能已包含了windows.h
      

  4.   

    Find in files
    只能搜索你所在工程目录中的文件
      

  5.   

    事情是这样引起的,我在保存工程的时候突然出现非法操作的错误,然后VC自动关闭,重新启动之后再打开这个程序编译就出现刚才的错误了,郁闷啊~
    我在整个目录下用window的搜索包含文字"windows.h"也没有发现结果
      

  6.   

    建议删除Debug或者Release文件夹,然后可以考虑删除 .ncb和.opt和两个文件,再重新编译看看。
      

  7.   

    可能是你的sdk,和mfc里的头文件相冲突。
    你在tools->options->directory换一下sdk和mfc头文件路径,然后一定要rebuild all.
    如果还有问题,就是你的文件包含次序有问题。
      

  8.   

    Debug 和.ncb和.opt都删除了,重新编译还是不行~
    哪个大哥能留下msn或QQ
    我把程序传给你帮我调调,谢谢了
      

  9.   

    Deleting intermediate files and output files for project 'CGViewer - Win32 Debug'.
    --------------------Configuration: CGViewer - Win32 Debug--------------------
    Compiling resources...
    Compiling...
    StdAfx.cpp
    d:\dh-cgcard\cgviewer\debug\msado15.tlh(407) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
    d:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
    Error executing cl.exe.CGViewer.exe - 1 error(s), 1 warning(s)
    我把程序拷贝到其他电脑上编译也是同样的错误
    用前几天的备份是可以的,但这几天都要白做了5555555555