Search code examples
c++pathdirectxdirectx-9

How to find DirectX loctation for d3dx9.h error


I don't nnow the location of my DirectX so is there a wway to find it?

I need it for fixing this : #include <d3dx9.h> error


Solution

  • The d3dx9.h legacy utility library for Direct3D 9 is only available in the DirectX SDK. June 2010 is the last release of the DirectX SDK and is on Microsoft Downloads--although not for long per this.

    Note that with Visual C++ 2012 or later, you must take special care when referencing the legacy DirectX SDK include/lib paths because they contain headers older than the Windows 8.x SDK/Windows 10 SDK used by Visual C++ so they can cause conflicts. Details on covered at the bottom of this page.

    D3DX9, D3DX10, D3DX11, and the DirectX SDK are all deprecated. See this blog post.

    The general recommendation is to NOT use Direct3D 9 at all and instead use Direct3D 11 or later. All required Direct3D includes/libs for DirectX 11 & DirectX 12 are included in the Windows SDK.

    For a list of modern replacements for the contents in the old D3D9X/D3DX10/D3DX11 utility libraries, see this blog post.