Quick answer: d3dcompiler_47.dll is Microsoft’s HLSL shader compiler. Windows 8.1 and later include it, Windows 7 only has it after an update, and the older d3dcompiler_43.dll is never part of Windows at all. If your game or something it is built on compiles shaders on the player’s machine, ship the DLL beside your executable from the Windows SDK redist folder, or precompile your shaders so the game does not need it.

A missing DLL dialog with “d3dcompiler” in it means some part of the game wanted to compile a shader and could not find the compiler. The number at the end of the file name decides everything that follows. One version ships with modern Windows and one comes from a DirectX package from 2010 that players have to install, so the first job is to read the exact name in the player’s screenshot. This guide covers what each file is, how to find which of your binaries asks for it, the two developer fixes, and what to tell players in the meantime.

The exact error

MyGame.exe - System Error
The code execution cannot proceed because d3dcompiler_47.dll was not found. Reinstalling the program may fix this problem.

Older Windows versions word it “The program can’t start because d3dcompiler_47.dll is missing from your computer. Try reinstalling the program to fix this problem.” The same two sentences appear with d3dcompiler_43.dll, and less often with 42, 41 or 46.

The dialog comes from the Windows loader. Your executable, or a DLL it loads at start-up, lists the compiler as an import, and the loader could not find the file in the game folder or the system folders. None of the game’s code has run.

What the file is, and which number you have

The D3DCompiler DLL turns HLSL shader source into the bytecode a GPU driver accepts. Each release has its own file name, and they are not interchangeable: a program built against version 43 will not accept 47.

FileComes fromOn a clean Windows 10 or 11 PCHow a player gets it
d3dcompiler_47.dllWindows itself (8.1 and later) and the Windows SDKPresentAlready there. On Windows 7, update KB4019990.
d3dcompiler_43.dllThe legacy DirectX SDK, June 2010AbsentThe DirectX End-User Runtime
d3dx9_43.dll, d3dx10_43.dll, d3dx11_43.dllThe same 2010 packageAbsentThe DirectX End-User Runtime
xinput1_3.dll, XAudio2_7.dllThe same 2010 packageAbsentThe DirectX End-User Runtime

This is why “I have DirectX 12, how can a DirectX file be missing” is a fair question from a player and has a simple answer. The 2010 files were never folded into Windows. A new PC has the newest Direct3D and none of them. If the dialog names anything ending in 43, see also the guide to xinput1_3.dll, which comes from the same package and has the same fix.

What causes it

  1. A dependency on the 2010 DirectX runtime that the installer never installs. The game, an old middleware DLL or an effects library was built with the legacy DirectX SDK, and your development PC has had that runtime for years. This is the usual cause for version 43.
  2. The copy that ships beside the executable is gone. Games built on Chromium (Electron, NW.js, CEF) carry their own d3dcompiler_47.dll in the application folder. Antivirus quarantine, a zip that was only partly extracted, or a player tidying the folder removes it.
  3. Windows 7 without the update. Version 47 arrived there as a separate update. Fewer players each year, and most current engines no longer support Windows 7, but it is still the textbook case.
  4. An injector the player added. Post-processing injectors and some mod loaders compile shaders themselves. The dialog appears for your game even though your game never touches the compiler.
  5. A damaged system folder, or a DLL of the wrong architecture that a player downloaded from a DLL site and dropped into the game folder. The second one turns into error 0xc000007b.
  6. A compatibility layer on Linux. Under Wine or Proton the built-in compiler normally satisfies the import. A custom prefix can lack it.

How to find what needs it

From a Visual Studio Developer Command Prompt in your build folder, list every binary that imports a compiler DLL:

for %f in (*.exe *.dll) do @(dumpbin /dependents "%f" | findstr /i "d3dcompiler d3dx" && echo    needed by %f)

Run it in plug-in subfolders too. The open-source Dependencies tool shows the same thing as a tree and marks a missing import in red.

A static import is only half the picture. Many programs load the compiler on demand with LoadLibrary. Those do not show a dialog when the file is missing. They start, and then the first shader compile fails: a black window, missing effects, or a line in the log. To catch that, run Sysinternals Process Monitor with a filter of Path contains d3dcompiler and start the game. A result of NAME NOT FOUND on every searched folder is the dynamic version of this error.

For Chromium-based games the symptom is different again. Chromium’s graphics layer translates WebGL to Direct3D and needs the compiler to do it. Without the file, hardware acceleration fails and the game either falls back to slow software rendering or loses WebGL. Players report “it runs at 5 FPS” and never mention a DLL.

Fix 1: ship the compiler with the game

For version 47, Microsoft supplies a redistributable copy in the Windows SDK, one per architecture:

C:\Program Files (x86)\Windows Kits\10\Redist\D3D\x64\d3dcompiler_47.dll
C:\Program Files (x86)\Windows Kits\10\Redist\D3D\x86\d3dcompiler_47.dll

Copy the one that matches your executable into the same folder as the executable. The application folder is searched first, so every player gets the version you tested with, including players on Windows 7 and players whose system copy is damaged. Add the copy step to your build script so a clean build cannot forget it.

For version 43 and the D3DX family, the established route is the installer: run the DirectX End-User Runtime setup as part of your install, or on Steam add the DirectX June 2010 package under the game’s redistributables in Steamworks so it installs on first launch. Microsoft also publishes these DLLs as a NuGet package, Microsoft.DXSDK.D3DX, intended for shipping them in the application folder. Read its licence terms before you rely on that.

For a Chromium-based game, the file is already in the framework’s distribution. The fix is packaging: make sure your packer includes every DLL from the runtime folder, and do not strip files to save a few megabytes.

Fix 2: compile shaders at build time

If the game is your own Direct3D code, the cleaner fix is to stop compiling on the player’s machine. Compile each shader during the build with fxc.exe from the Windows SDK and ship the bytecode:

fxc /T vs_5_0 /E VSMain /O2 /Fo shaders\sprite_vs.cso shaders\sprite.hlsl
fxc /T ps_5_0 /E PSMain /O2 /Fo shaders\sprite_ps.cso shaders\sprite.hlsl
// Before: compiles on the player's PC, needs d3dcompiler_47.dll
D3DCompileFromFile(L"shaders\\sprite.hlsl", nullptr, nullptr,
                   "PSMain", "ps_5_0", 0, 0, &blob, &errors);
device->CreatePixelShader(blob->GetBufferPointer(), blob->GetBufferSize(),
                          nullptr, &pixelShader);

// After: loads bytecode, no compiler involved
std::vector<char> bytes = ReadFile("shaders/sprite_ps.cso");
device->CreatePixelShader(bytes.data(), bytes.size(), nullptr, &pixelShader);

Once nothing calls D3DCompile, remove d3dcompiler.lib from the linker inputs and the import disappears. Start-up gets faster as well, and a shader syntax error becomes a failed build on your machine instead of a black screen on someone else’s. Keep runtime compilation only where you need it, such as a shader hot-reload path in development builds.

If the dependency is the old D3DX library, the long-term fix is to replace it. D3DX is deprecated, and its texture loading and math have maintained open-source successors from Microsoft (DirectXTex, DirectXTK, DirectXMath).

What to tell players

  1. Check the exact file name in the error. The steps differ for 47 and 43.
  2. For d3dcompiler_43.dll or any d3dx file: install the DirectX End-User Runtime from Microsoft’s website. It adds the 2010 files and does not change the DirectX version you already have.
  3. For d3dcompiler_47.dll: verify the game files (Steam: Properties > Installed Files > Verify integrity) or extract the download again, and check the antivirus quarantine list.
  4. On Windows 7, install Windows updates, including KB4019990.
  5. Remove post-processing injectors and mods, then try again.
  6. Do not download the DLL from a DLL site. Those copies are often the wrong architecture and sometimes worse.

How to confirm the fix

A normal Windows 10 or 11 test machine cannot prove anything about version 47, because the system copy satisfies the import whether or not you shipped your own. Two checks do work. Run the dumpbin loop on the final build and confirm the import is gone (Fix 2), or watch the launch in Process Monitor and confirm the DLL is loaded from your game folder (Fix 1). For version 43, use a clean virtual machine with no DirectX runtime installed: the game must start there, straight from the installer or the store client.

What Bugnet can and cannot report here

When the loader shows this dialog, the process never starts, so there is no report from Bugnet or from any in-game tool. The dynamic case is different, because the game is running. A Chromium-based game that has lost WebGL can detect it (context creation returns null, or the renderer string names a software rasteriser) and file it with Bugnet.reportBug(title, description, { category: "other" }) from the Web SDK. The report carries the user agent and game version, and identical titles stack into one entry with an occurrence count, which tells you how many installs are missing the file. For players who never get in, a known-issue entry on the project’s public tracker, titled with the exact file name and carrying the steps above, is what they find when they search the message.

Frequently asked questions

What is d3dcompiler_47.dll?

It is Microsoft’s Direct3D shader compiler, the library that turns HLSL shader source into bytecode for the GPU. Windows 8.1 and later include it in the system folders, and the Windows SDK provides a copy that applications are allowed to ship in their own folder.

What is the difference between d3dcompiler_47.dll and d3dcompiler_43.dll?

They are different releases of the same compiler and are not interchangeable. Version 47 comes with Windows. Version 43 comes from the DirectX SDK of June 2010 and is never part of Windows, so players need the DirectX End-User Runtime to get it.

Why is a DirectX DLL missing when the player has DirectX 12?

The files from the 2010 DirectX package, such as d3dcompiler_43.dll, d3dx9_43.dll and xinput1_3.dll, were never built into Windows. A PC can have the newest Direct3D and none of them. Installing the DirectX End-User Runtime adds them without changing anything else.

Can I ship d3dcompiler_47.dll with my game?

Yes. Copy it from the Redist folder of the Windows SDK, matching your executable’s architecture, and place it beside the executable. Windows searches the application folder first, so the game uses your copy on every machine.

How do I remove the dependency on d3dcompiler entirely?

Compile your shaders during the build with fxc.exe and load the compiled bytecode at run time. When no code calls D3DCompile, the import goes away, start-up is faster, and shader errors are caught on your machine.

Read the number in the file name before doing anything else. 47 is a packaging problem you fix once in the build. 43 is a 2010 runtime your installer has to bring with it.