Directx报错01

--------------------Configuration: LDCTextCtrl - Win32 Debug--------------------

Compiling...

LDCTextControl.cpp

d3dx9math.h(392) : error C2061: syntax error : identifier 'THIS_FILE'

d3dx9math.h(392) : error C2091: function returns function

d3dx9math.h(392) : error C2802: static member 'operator new' has no formal parameters

d3dx9math.h(393) : error C2061: syntax error : identifier 'THIS_FILE'

d3dx9math.h(393) : error C2090: function returns array

d3dx9math.inl(990) : error C2061: syntax error : identifier 'THIS_FILE'

d3dx9math.inl(991) : error C2091: function returns function

d3dx9math.inl(992) : error C2065: 's' : undeclared identifier

d3dx9math.inl(1005) : error C2061: syntax error : identifier 'THIS_FILE'

d3dx9math.inl(1005) : error C2090: function returns array

d3dx9math.inl(1006) : error C2084: function 'void *(__cdecl *__cdecl _D3DXMATRIXA16::operator new(void))(unsigned int)' already has a body

 

d3dx9math.h(392) :原因

关于宏与头文件错误的冲突问题的解决
宏与头文件错误的冲突问题

 

在文件test7Dlg.cpp当有如下定义时:
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include <vector>
就会出现如下错误:

 

1。把#include <vector>语句放在test7Dlg.h文件中
2
。把定义顺序颠倒下,如下所示:
#include <vector>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
原因:
VC6
是可以支持的,不过头文件的声明
#include <list>
using namespace std;
要在系统生成的代码
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
之前

 

 

所以:要把

#include "d3dUtility.h"

语句放在

#ifdef _DEBUG

#undef THIS_FILE

static char THIS_FILE[]=__FILE__;

#define new DEBUG_NEW

#endif 之前,因为

 

"d3dUtility.h"首先

#include <d3dx9.h>

//#include <string>

 

 

转载于:https://www.cnblogs.com/carl2380/archive/2011/01/13/1934341.html

### 回答1: cdrawbasic_dx11 是 Direct3D 11 绘图库的一个示例程序,报错可能是由于编译器或环境设置不正确导致的。你可以尝试以下步骤来解决这个问题: 1. 确保你的编译器支持 DirectX 11,并且已经正确安装了 DirectX SDK。 2. 检查项目的依赖项是否正确设置。例如,检查是否包含正确的头文件和库文件。 3. 确认编译器的链接选项是否正确。例如,检查是否正确链接了 DirectX 库文件。 4. 检查你的操作系统和硬件是否支持 DirectX 11。如果你的系统不支持 DirectX 11,则无法运行 Direct3D 11 应用程序。 希望这些建议能帮助你解决问题。如果问题仍然存在,请提供更多详细信息,以便我可以更好地帮助你。 ### 回答2: cdrawbasic_dx11报错可能是由于以下原因导致: 1. 缺少相关的依赖库或DLL文件:在使用cdrawbasic_dx11时,如果缺少必要的依赖库或DLL文件,可能会导致报错。解决方法是确保所需的依赖文件已正确安装,并在程序运行时可访问。 2. 驱动不符合要求:如果使用的图形驱动程序版本与cdrawbasic_dx11要求的驱动版本不兼容,可能会导致报错。解决方法是检查图形驱动程序的版本,并根据需要更新或升级驱动程序。 3. 编译或链接错误:如果在编译或链接cdrawbasic_dx11项目时出现错误,可能会导致报错。解决方法是再次检查项目配置、代码语法和项目设置,确保没有错误或遗漏。 4. 硬件不支持:如果使用的硬件不满足cdrawbasic_dx11的最低要求,可能会导致报错。解决方法是检查硬件设备的规格,并根据需要进行升级或更换硬件。 在解决cdrawbasic_dx11报错时,可以尝试逐个排查这些可能的原因,并根据具体情况采取相应的解决措施。如果无法解决报错,可以尝试搜索相关的错误信息或与相关技术人员沟通以获得更详细的帮助和支持。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值