Can't find d3dcompiler_43.dll for DirectX programming
Asked Answered
H

4

16

I am trying to learn DirectX Programming. But I have hit a snag.

I seem to be missing this file: d3dcompiler_43.dll

I have installed (in this order):

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

I figured I need a DirectX SDK, but this link says I do not:

Starting with Windows 8, the DirectX SDK is included as part of the Windows SDK.

Should I just install the DirectX Distributable? I am worried that will give me the dll but I will be missing other things too...

Here is my exact error I am getting:

Unable to load DLL 'd3dcompiler_43.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Update: I ran dxdiag and it says I have DirectX 11 installed... Not sure why I can't make this work.

Hapten answered 24/11, 2012 at 18:44 Comment(4)
Try downloading DirectX Distributable, cant hurt.Normannormand
@ForgiveMeI'mAN00b - All the Dists that I can find are for 2010 and DirextX 9...Hapten
microsoft.com/en-us/download/details.aspx?id=6812 will get you directx11 SDK. The 2010 dists are for DirectX11 I think.Normannormand
@Aaron, I had the same error, and that was how I fixed it.Estellestella
H
15

I found the answer here: 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. 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.

Hapten answered 24/11, 2012 at 22:26 Comment(2)
Funny thing is, on windows 8 I get this error on windows 8.1 I don't get it. File is missing from folder. So the information is not completely right.Isopleth
Im curious, did this actually solve your problem in reality, or was this a "best fix you could find"? In my case, it was giving the exact same error code (which is calling for 43.dll, not 46.dll), and newer versions would not fix it. I had to actually go back and get 43.dll from an old directX install.Estellestella
G
5

See this blog post for details about D3DCompile and how you distribute various versions of it...

In short:

  • #43 and prior is deployed by the legacy DirectX End-User Runtime Redist (aka DirectSetup).
  • #46 is installed by VS 2012 / Windows 8.0 SDK and is deployed 'side-by-side' with your Win32 desktop app
  • #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.
Grandmotherly answered 26/6, 2014 at 8:7 Comment(2)
This greatly helped me, as it was specifically the #43 this error was calling for. Other users running into the same problem can download legax Directx End-User Runtime Redist from here.Estellestella
Got this error with d3dcompiler_43.dll on MonoGame on Windows 10. Installing the DirectX End-User Runtime solved that. Thanks!Campy
S
3

If you have Chrome installed, worth a butchers in here:

C:\Users\<USER>\AppData\Local\Google\Chrome\Application\26.0.1410.64
Shadoof answered 13/5, 2013 at 16:21 Comment(3)
Downvoter - this answer is useful. I got the dll from here and it saved downloading the whole of Windows SDK.Shadoof
As of Chrome 65 x86, it comes with d3dcompiler_47.dll, not d3dcompiler_43.dll :(Lenhard
Too late - the DX June 2010 redist install was running while you were responding, and now the program in question works fine :) . (This, by the way - a demo just released over Easter weekend, and well worth a watch)Lenhard
D
3

You need to install the latest DirectX http://www.microsoft.com/en-us/download/confirmation.aspx?id=35

Doorway answered 5/5, 2014 at 5:25 Comment(1)
the particular version OP is missing will not install from the link you provide. I sourced the file back to "Legacy DirectX" from 2010. The latest versions do not include it, anymore, and as I have since tested, it makes a big difference.Estellestella

© 2022 - 2024 — McMap. All rights reserved.