1

我想使用包含文件

#include <d3d11.h>
#include <d3dx11.h>
#include <d3dcompiler.h>
#include <xnamath.h>

在视觉工作室 6.0 中。但是当我编译 .cpp 时,我们得到了这个错误:

:\Users\8up tuotlo\Desktop\Visual C++ 6.0 Proects\11\Article1\Article1.cpp(28) : error C2146: syntax error : missing ';' before identifier 'CD3D11_DEFAULT'

:\Users\8up tuotlo\Desktop\Visual C++ 6.0 Proects\11\Article1\Article1.cpp(28) : 错误 C2146: 语法错误: 缺少 ';' 在标识符“CD3D11_DEFAULT”之前当我包括:

#include <d3d9.h>
#include <d3dx9.h>

所有正常编译。这是什么?

4

1 回答 1

2

检查编译器对最新版本的 Windows SDK 的支持。我怀疑 VC++6 不再受支持(自发布以来已超过 15 年,从那时起发布了6 个版本)。

于 2012-12-01T09:34:04.260 回答