将Directx 11项目转换为在Windows 8.1 Directx 11.2上运行

时间:2014-04-06 16:57:47

标签: directx windows-8.1 direct3d directx-11

我正在尝试运行Frank Luna提供的示例项目(使用DirectX 11.0进行3D游戏编程简介)。 http://www.d3dcoder.net/d3d11.htm

我使用安装了Windows 8 SDK的Windows 8.1 - 在Visual Studio 2012上(因为我读到Windows 8.1 SDK包含direct x 11.2)。

每当我尝试运行项目时,我都会遇到以下构建错误:

Error   1   error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\vertex.h 10  1   Camera
Error   2   error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\renderstates.h   10  1   Camera
Error   3   error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\effects.h    11  1   Camera
Error   4   error C1083: Cannot open include file: 'd3dApp.h': No such file or directory    c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\camerademo.cpp   13  1   Camera
Error   5   error C1083: Cannot open include file: 'xnamath.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\common\waves.h    13  1   Camera
Error   6   error C1083: Cannot open include file: 'xnamath.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\common\mathhelper.h   11  1   Camera
Error   7   error C1083: Cannot open include file: 'xnamath.h': No such file or directory   c:\users\ryan willis\desktop\dvd\code\common\lighthelper.h  11  1   Camera
Error   8   error C1083: Cannot open include file: 'd3dx11.h': No such file or directory    c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h  13  1   Camera
Error   9   error C1083: Cannot open include file: 'd3dx11.h': No such file or directory    c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h  13  1   Camera
Error   10  error C1083: Cannot open include file: 'd3dx11.h': No such file or directory    c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h  13  1   Camera
Error   11  error C1083: Cannot open include file: 'd3dx11.h': No such file or directory    c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h  13  1   Camera

经过更多研究后,Direct 11.1开始改变很多事情,例如" d3dUtil.h"折旧。

http://blogs.msdn.com/b/jgalasyn/archive/2013/08/06/notes-on-porting-to-directx-11-1-from-earlier-versions.aspx

对于' d3dUtil.h'是否有任何等同物? - 我找不到任何东西。 我怎样才能运行这个项目?

谢谢,

3 个答案:

答案 0 :(得分:2)

DirectX永远不会有d3dUtil.h文件,似乎是Frank Luna制作的助手类,你应该仔细检查你是否在项目中包含了该文件。

答案 1 :(得分:1)

我建议HIGHLY查看Frank的网站

http://www.d3dcoder.net/

主要是他的博客文章:http://d3dcoder.net/WordPress/

它涵盖了安装2010年6月的SDK,您可以访问折旧的DX11标题。

在8.1上运行它有很多问题,他在那里解决了所有这些问题。 我有同样的书,按照他的Windows 8安装指南,它工作正常。

答案 2 :(得分:0)

在Windows 8中删除了XNA和D3DX库,许多项目无法在Windows 8上编译,包括原始的DirectX 11 SDK示例项目。