安装完Win10调试程序突然在这个地方报错:

#if (defined(DEBUG) || defined(_DEBUG))
deviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif /* (defined(DEBUG) || defined(_DEBUG)) */

 

错误信息如下:

D3D11CreateDevice: Flags (0x2) were specified which require the D3D11 SDK Layers for Windows 10, but they are not present on the system. These flags must be removed, or the Windows 10 SDK must be installed. Flags include: D3D11_CREATE_DEVICE_DEBUG

 

问题分析:

以前在win7 和Win8 下安装完DirectX 的SDK就不错了,在Win10 下则装了DirectX也报错(Win8 的SDK 和Win10 的SDK都装了)

后来在MSDN的博客中发现:

 

Windows 10 optional feature: Graphics Tools

There are several scenarios where you need only minimal graphics tools on the target system. For example:

  • Install the D3D SDK Layers so that your application can create a D3D Debug device
  • Use DXCAP command line tool to capture and playback D3D graphics log file
  • Scripting of API traces or doing regression testing on a lab machine

In these cases, all you need to install is the Windows 10 optional feature of “Graphics Tools”.

To install the Graphics Tools optional feature, go to the Settings panel, under System, Apps & features, Manage optional Features, Add a feature, and then look for “Graphics Tools”

 

 

 

解决方案:

方法1

Settings panel -> System -> Apps & features -> Manage optional Features -> Add a feature -> Select "Graphics Tools"

 

 

方法2

用管理员身份打开命令行工具(cmd),执行如下命令:

Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

 

 

参考

Visual Studio 2015 and Graphics Tools for Windows 10

Use D3D11 debug layer with VS2013 on Windows 10

VS2015+Win10 调试DirectX 报错的更多相关文章

  1. 【Datastage】Datastage在win10上安装报错:This Application requires one of the following versions of the .NET Framework:v1.1.4322 Do you want to install this .NET Framework version now?

    Datastage在win10上安装报错如下: 这个错误的意思是:.netFramWork的版本不符合要求,于是,我在网上下载了一个版本一致的 下载地址为:http://pan.baidu.com/s ...

  2. 获取win10 Insider Preview报错0x80080300

    获取win10 Insider Preview报错0x80080300 1.msconfig2.隐藏Microsoft 服务3.disable 剩下的服务4.win + i, Update&s ...

  3. Ubuntu-1404 GDB 调试C++报错

    问题 Ubuntu1404下,当用GDB调试C++程序时,报错ImportError: No module named 'libstdcxx' 解决办法 vim ~/.gdbinit #~/.gdbi ...

  4. win10安装wmi报错问题

    在win10上,安装wmi,首先下载https://pypi.python.org/pypi/WMI/#downloads,将wmi下载下来 安装过程中,会报错,No Python installat ...

  5. 本地调试 谷歌浏览器报错:跨域问题处理 Access-Control-Allow-Origin

    前端在本地,调试,就经常的就是会遇到 调用接口,提示跨域了. 如你要访问 http://****/api/user chrome 浏览器 报错: XMLHttpRequest cannot load ...

  6. ionic真机调试Android报错 - could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon

    在使用真机调试Android程序时,报错如下: could not read ok from ADB Server * failed to start daemon error: cannot con ...

  7. 安卓小程序的一次bug调试,报错:java.lang.NullPointerException,logcat学习

    做实验的时候,调试了很久后模拟器执行后,app还是会崩溃并停止运行,错误如下. 因为初学,所以也不知道怎么使用调试工具,也不懂看日志,经过学习后尝试这查看了LogCat日志上面有这样的提示: 其中引起 ...

  8. Delphi2007 在Win10 下运行报错 Assertion failure

    Delphi2007 原来安装在Win7 下 运行正常, 自从升级到Win10 ,新建工程运行然后关闭报错, 报错信息如下: ---------------------------bds.exe - ...

  9. vscode与MinGW64调试c++报错

    这个问题在刚配好环境测试的时候往往不会被发现,因为单纯的c++编译调试是没问题的.但一旦调试使用stl库的代码就会报错,而编译又没问题且可以正常运行,但在vscode的集成终端里运行不会显示任何本该显 ...

随机推荐

  1. HTML5权威指南--Web Storage,本地数据库,本地缓存API,Web Sockets API,Geolocation API(简要学习笔记二)

    1.Web Storage HTML5除了Canvas元素之外,还有一个非常重要的功能那就是客户端本地保存数据的Web Storage功能. 以前都是用cookies保存用户名等简单信息.   但是c ...

  2. 前端学PHP之PDO预处理语句

    × 目录 [1]定义 [2]准备语句 [3]绑定参数[4]执行查询[5]获取数据[6]大数据对象 前面的话 本来要把预处理语句和前面的基础操作写成一篇的.但是,由于博客园的限制,可能是因为长度超出,保 ...

  3. NSCharacter​Set 使用说明

    NSCharacter​Set 和 NSMutableCharacterSet  用面向对象的方式来表示一组Unicode字符,它经常与NSString及NSScanner组合起来使用,在不同的字符上 ...

  4. angularjs和ajax的结合使用 (一)

    好久没写文了.这是一篇关于easyui配合ajax使用 的文章, 顺带介绍angularjs的使用 以及让你感受到angularjs的威力.网上对于ajax 的文也是多如牛毛 .我就不直接 从那种原生 ...

  5. A chatroom for all! Part 1 - Introduction to Node.js(转发)

    项目组用到了 Node.js,发现下面这篇文章不错.转发一下.原文地址:<原文>. ------------------------------------------- A chatro ...

  6. Redis简单案例(四) Session的管理

    负载均衡,这应该是一个永恒的话题,也是一个十分重要的话题.毕竟当网站成长到一定程度,访问量自然也是会跟着增长,这个时候, 一般都会对其进行负载均衡等相应的调整.现如今最常见的应该就是使用Nginx来进 ...

  7. C#递归解决汉诺塔问题(Hanoi)

    using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace MyExamp ...

  8. 01windows窗体程序学习

    静态用户名和密码的登录练习 private void button2_Click(object sender, EventArgs e) { textUser.Text = Convert.ToStr ...

  9. SSH中Action的单例与多例

    Structs2中的Bean默认的是单例,在整个程序运行期间,每个Bean只有一个实例,只要程序在运行,这个实例就一直存在. 对于Action来说,单例就容易出问题.如果客户端每次提交的参数都是一样的 ...

  10. linux中字体的安装以及Terminal字体重叠问题解决

    安装wps的时候,经常会提示你系统字体缺失,这些字体网上都有,就不分享了,直接讲安装吧. 就比如这个Wingdings字体,在字体目录中新建一个目录Wingdings,将ttf字体文件复制进去,在终端 ...