编译时候,报错
D:\MyProject\MyDirectX.cpp(1244) : error C2065: 'EXECUTE_ASSERT' : undeclared identifier我查了MSDN,看了EXECUTE_ASSERT 需要头文件wxdebug.h。
于是在MyDirectX.cpp头部加了一行:
#include <wxdebug.h>在编译还是出错。
这是什么原因哪?????求大虾指点迷津。

解决方案 »

  1.   

    看看在你的wxdebug.h文件里有没有这个?包含了不一定存在
      

  2.   

    Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
      

  3.   

    检查一下是不是需要定义什么宏才会有EXECUTE_ASSERT定义
      

  4.   

    看了MSDN的解释,好象还要LIB文件,不过根据你的错误信息看不是少了LIB文件
      

  5.   

    估计是还需要定义什么宏,比如#define __WIN32_WINNT 0x0400
      

  6.   

    也可以按楼上的方法试
    在StdAfx.h的开头加入以下定义
    #undef WINVER
    #define WINVER 0x0500
      

  7.   

    多谢,我把 #include"stdafx.h"提前到#include <wxdebug.h>,就没这个错误了。我的stdafx.h文件是这样的:
    //---------------------------#if !defined(AFX_STDAFX_H__CDA9CA9F_67F4_45F1_9959_F81723B4E60A__INCLUDED_)
    #define AFX_STDAFX_H__CDA9CA9F_67F4_45F1_9959_F81723B4E60A__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000
    //#define _WIN32_WINNT 0x501
    #define _WIN32_IE 0x0500 // For cool Baloon Tooltips
    //#define WINVER 0x0500 // Include aditional extended headers   #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers#include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #include <mmsystem.h> // Multimedia extensions for audio&video stuff
    //#include <Winuser.h> // For extended Menu functions
    #include <afxmt.h> // Mutex and other Syncronization support
    #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h> // MFC support for Windows Common Controls
    //#include <commctrl.h>
    #endif // _AFX_NO_AFXCMN_SUPPORT
    //{{AFX_INSERT_LOCATION}}
    // Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_STDAFX_H__CDA9CA9F_67F4_45F1_9959_F81723B4E60A__INCLUDED_)//==========================================
    看来这个stdafx.h对于包含文件、预编译什么的还挺重要啊。
    多谢个为大侠拔刀相助。