DX12 - D3D12GetDebugInterface - 应用程序请求的接口取决于 SDK 组件丢失或不匹配

DX12 - D3D12GetDebugInterface - app requested interface depends on SDK component missing or mismatched

我一直在努力弄清楚如何 运行 我从互联网上获取的一些代码,以了解如何制作正确的 directX 12 应用程序,当我 运行 它时,我得到了错误下面的消息,指向下方第二张图片中显示的代码。

我已经 运行 Windows 更新了好几次并安装了 DirectX End-User 运行时安装程序,但我仍然收到此消息。我需要做什么来解决这个问题?我很难过。

Windows 10 的 DirectX“调试层”作为 'optional feature' 安装在您的 Windows 安装中。转到“设置”面板,在“系统”、“应用程序和功能”、“管理可选功能”、“添加功能”下,然后查找“图形工具”。

The "DirectX End-User Runtime Installer" has not actually changed the version of DirectX installed on any version of Windows since ~2002. It has also never installed the debug runtime. The legacy DirectX SDK only includes an old Windows 7 RTM version of the Debug Layer for DirectX 11.0. On Windows 7 with the KB2670838 installed or Windows 8.x, you need to install the latest Windows SDK to get the debug layers installed.

For more information, see Direct3D SDK Debug Layer Tricks and Not So Direct Setup.