My question is quite simple : Is vcredist_x86.exe installs d3dcompiler_47.dll or it needs to be next to .exe + vcredist_x86.exe ?
Jump to content
Posted 19 April 2014 - 01:57 PM
It's part of the DirectX runtime, so if the correct version of DirectX is available, then it's already installed. If you want to include it in an installer you should include or link to the DirectX runtime installer.
Edited by Erik Rufelt, 19 April 2014 - 02:21 PM.
Posted 19 April 2014 - 02:04 PM
Windows 7 user? Visual Studio 2013? Program works OK when you run it from Visual Studio but doesn't work when you run it standalone? Error message is that d3dcompiler_47.dll is missing?
This DLL isn't installed by any vcredist, it's part of DirectX but - for some reason - Microsoft don't provide it for Windows 7. You can go to Windows Update as much as you like, you can update your DirectX, you won't get it.
One solution is to redistribute it yourself - just include it with your distributed program. This is allowed; see the section titled "redistribution" at http://blogs.msdn.com/b/chuckw/archive/2012/05/07/hlsl-fxc-and-d3dcompile.aspx
Another solution is to compile your shaders offline and include the blobs with your distributed program. You don't need to go near d3dcompiler_47.dll at all then.
A third solution is to dynamically link using LoadLibrary and GetProcAddress. Try 47, if it doesn't succeed try 46, then 45, and so on. d3dcompiler_43.dll was the latest version included with Windows 7 (d3dcompiler_33 was the first), so either you'll eventually succeed or the user just needs to update their DirectX.
Yes, this is the same kind of mess as the "D3DX DLL hell" thhat we had with DirectX 9.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.