简体   繁体   English

找不到用于DirectX编程的d3dcompiler_43.dll

[英]Can't find d3dcompiler_43.dll for DirectX programming

I am trying to learn DirectX Programming. 我正在尝试学习DirectX编程。 But I have hit a snag. 但我遇到了障碍。

I seem to be missing this file: d3dcompiler_43.dll 我好像错过了这个文件:d3dcompiler_43.dll

I have installed (in this order): 我安装了(按此顺序):

  1. Visual Studio 2012 Visual Studio 2012
  2. Windows 8 Windows 8
  3. Windows Phone 8 SDK Windows Phone 8 SDK
  4. Windows 8 SDK Windows 8 SDK

I figured I need a DirectX SDK, but this link says I do not: 我想我需要一个DirectX SDK,但这个链接说我没有:

Starting with Windows 8, the DirectX SDK is included as part of the Windows SDK. 从Windows 8开始,DirectX SDK作为Windows SDK的一部分包含在内。

Should I just install the DirectX Distributable? 我应该只安装DirectX Distributable吗? I am worried that will give me the dll but I will be missing other things too... 我担心会给我这个dll但是我也会遗漏其他的东西......

Here is my exact error I am getting: 这是我得到的确切错误:

Unable to load DLL 'd3dcompiler_43.dll': The specified module could not be found. 无法加载DLL“d3dcompiler_43.dll”:找不到指定的模块。 (Exception from HRESULT: 0x8007007E) (来自HRESULT的异常:0x8007007E)

Update: I ran dxdiag and it says I have DirectX 11 installed... Not sure why I can't make this work. 更新:我运行了dxdiag ,它说我安装了DirectX 11 ......不知道为什么我不能让这个工作。

I found the answer here: http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx 我在这里找到答案: http//msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx

It says: 它说:

Any project that uses run-time shader compilation must have D3DCOMPILER_46.DLL copied to the local executable path for the project. 使用运行时着色器编译的任何项目都必须将D3DCOMPILER_46.DLL复制到项目的本地可执行路径。 This DLL is available in this sub-directory of the Windows SDK installation under %ProgramFiles(x86)%\\Windows Kits\\8.0\\Redist\\D3D\\arch where arch is x86 and x64. 此DLL在Windows SDK安装的此子目录中可用于%ProgramFiles(x86)%\\ Windows Kits \\ 8.0 \\ Redist \\ D3D \\ arch,其中arch是x86和x64。

See this blog post for details about D3DCompile and how you distribute various versions of it... 有关D3DCompile以及如何分发其各种版本的详细信息,请参阅此博客文章 ...

In short: 简而言之:

  • #43 and prior is deployed by the legacy DirectX End-User Runtime Redist (aka DirectSetup). #43和先前版本由传统的DirectX最终用户运行时重定向程序(也称为DirectSetup)部署。
  • #46 is installed by VS 2012 / Windows 8.0 SDK and is deployed 'side-by-side' with your Win32 desktop app #46由VS 2012 / Windows 8.0 SDK安装,并与您的Win32桌面应用程序“并排”部署
  • #47 is installed by VS 2013 / Windows 8.1 SDK and can be deployed 'side-by-side' with your Win32 desktop app, but it is also included with the Windows 8.1 OS. #47由VS 2013 / Windows 8.1 SDK安装,可与您的Win32桌面应用程序“并排”部署,但它也包含在Windows 8.1操作系统中。

如果你安装了Chrome,那么值得一个屠夫:

C:\Users\<USER>\AppData\Local\Google\Chrome\Application\26.0.1410.64

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM