Windows 8 SDK中的DirectX [英] DirectX in Windows 8 SDK

查看:101
本文介绍了Windows 8 SDK中的DirectX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摘要:应该从DirectX包含文件中删除针对Windows 8的应用程序吗?

Summary: Should directX include files be removed from applications targeting Windows 8?

详细信息

我是在Windows中进行开发的新手,我试图使NVIDIA SDK在Windows 8上使用Visual Studio 2012进行编译(如果可能)。编译时出现错误消息:无法打开包含文件:'d3dx9.h':没有这样的文件或目录

I'm new to developing in Windows and I'm trying to get the NVIDIA SDK to compile on Windows 8 with Visual Studio 2012 (if possible). When compiling I've gotten an error message: Cannot open include file: 'd3dx9.h': No such file or directory.

我已阅读 DirectX SDK在哪里?文章,但是我对它要做什么感到困惑。

I've read the Where is the DirectX SDK? article, but I'm confused about what it is saying to do.

假设我不关心Windows 7,只想在Windows 8上测试桌面应用程序(暂时忽略Metro),我是否需要保留包含作为NVIDIA SDK中的 #include< d3dx9.h> #include< d3dx11.h> 应用程序,还是应该删除这些内容?如果确实保留它们,则需要安装什么以便可以找到文件。

Assuming that I don't care about Windows 7 and only want to test desktop applications on Windows 8 (ignoring Metro for now), do I need to keep the includes such as #include <d3dx9.h> and #include <d3dx11.h> that are in the NVIDIA SDK app, or should I remove these includes? If I do keep them what do I need to install so that the files can be found.

推荐答案

这些示例旨在

但是,Microsoft建议不要再使用D3DX *。他们弃用了独立的DirectX SDK,剥离了 d3dx * .h d3dx * .li b文件并将其合并到Windows 8 SDK。

However, Microsoft does not recommend to use D3DX* stuff anymore (among others). They deprecated standalone DirectX SDK, stripped d3dx*.h and d3dx*.lib files and merged remains to Windows 8 SDK.

因此,要构建示例,您必须使用:

So, to build samples you must use:

  • For DirectX headers/libs: old standalone DirectX SDK (Jun 2010)
  • For other Windows headers/libs: Windows 7 SDK -OR- Windows 8 SDK in "XP mode" (Project Properties -> General -> Platform Toolset -> v110_xp )

为防止头文件和库文件混合使用,最好在 VC ++目录中为它们设置确切的路径。

To prevent mixing headers and libs, it is better to set exact paths to them in "VC++ Directories".

对于您自己的新项目,最好不要使用DirectX SDK,而应使用Windows 8 SDK中的DirectX标头。

For your own new projects it is better not to use DirectX SDK, but use DirectX headers from Windows 8 SDK.

这篇关于Windows 8 SDK中的DirectX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆