Where has the DirectX SDK gone

I heard that DirectX11 has released many new features, so based on my experience, I went online to find an SDK to experience it. However, I didn't have many resources and finally found it, but the installation failed with error code "S1023". So I went to the Microsoft official website and finally found "DXSDK-Mar09", but the installation still failed. So I turned around and checked what S1023 meant. Upon investigation, it turned out to be due to the presence of a higher version of DirectX in the system. Well, I haven't specifically installed DirectX11 on my Win7 before. So I flipped through the official website again and finally saw an article titled "Where is the DirectX SDK?". Only after reading the entire text can we know the truth. The main terms are now translated as follows:

DirectX is now an important component of Windows. Because the Windows SDK is the main development SDK for Windows (since Windows 8, DirectX has become a part of the Windows SDK), you have the latest DirectX SDK when you download the latest WinSDK. That is to say, if you install VS2012 or VS2013, you will have a new version of the D3DXSDK.

However, D3DX is not a basic API for using Windows SDK, so if you want to develop DirectX programs using D3DX SDK, you need to do the following (steps 5 to 10 in the original text are about setting project properties, so I won't have to worry about it):

    1. Modify the project's VC++ Directions as follows to use the right order for SDK headers and libraries.

      Modify the "VC++ directory" in the project (properties) as follows to call the SDK's header and library files
      i Open Properties for the project and select the VC++ Directories page
      Open the properties of the project and select the "VC+ Directory" page
      ii Select All Configuration and All Platforms
      Select "All Configuration" and "All Platforms"
      iii Set these directories as follows:
      • Executable Directors:< Inherit from parent or project defaults> (On right side drop down)
      • Executable (file) directory: Inherit from parent or project default directory
      • Include Directors: $(InclusiePath)$ (DXSDK-DIR) Include
      • Include directory: $(InclusiePath)$ (DXSDK-DIR) Include
      • Include Library Directors: $(LibraryPath)$ (DXSDK-DIR) Lib x86
      • Library directory: $(LibraryPath)$ (DXSDK-DIR) Lib x86
      iv Click Applyv Choose the x64 Platformvi Set the Library Directory as follows:
      • Library Directories: $(LibraryPath)$ (DXSDK-DIR) Lib x64
    2. Where" D3dx9. h"" D3dx10. h", Or; D3dx11. h" Are included in your project, be sure to explicitly include" D3d9. h" D3d10. h" And; Dxgi. h;, Or; D3d11. h" And; Dxgi. h; First to ensure you are picking up the new version You can disable warning C4005 if needed; However, this warning indicates that you are using the older version of these heads
    3. Remove all references to DXGIType.h in your project This header does' T exists in the Windows SDK, and the DirectX SDK version conflicts with the new winerror. h
    4. All D3DX DLLs are installed on your development computer by the DirectX SDK installation Ensure that the necessary D3DX dependencies are redistributed with any sample or with your application if it is moved to another machine
    5. Be aware that replacement technologies for current uses of D3DX11 include DirectXTex and DirectXTK D3DXMath is replaced by DirectXMath
  1. Ensure that you are using the new version of the HLSL shader compiler by observing the following conditions:

    1. Changing the executable directory as per step 5 will cause project builds to use FXC from the Windows SDK installation Be aware that HLSL files are now officially recognized by Visual Studio You can add them as project files and set compiler options through the project system.

    2. Invoking runtime compilation through the legacy D3DX DLL will use the incorrect older version of the HLSL compiler Replace all references to D3DXCompile *, D3DX10Compile *, and D3DX11Compile * APIs in your code with the D3DCompile function in D3DCOMPILER_ 46. DLL or D3DCOMPILER_ 47. DLL.

    3. Any project that uses runtime shadow compilation must have D3DCOMPILER_ XX 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> Or% ProgramFiles (x86)% Windows Kits 8.1 Redist D3D < Arch> Where< Arch> Is x86 and x64.

      The D3DCOMPILER_ 46. DLL or D3DCOMPILER_ 47. DLL from the Windows SDK is not a system component and should not be copied to the Windows system directory You can redistribute this DLL to other computers with your application as a side by side DLL.

  2. Any project that uses the XINput API and is intended to run on Windows 7 or older versions of Windows needs to use either the legacy version (9.1.0) or will need to explicitly include the headers and libraries for this component from the DirectX SDK The XINput header and XINPUT LIB that is included in the Windows SDK target only the version (1.4) that ship as part of Windows 8 and later The same header can be used with XINPUT9_ 1_ 0. LIB to use the legacy version, which is included with older versions of Windows The legal version of XINput does' Detect full capabilities or support controller integrated audio, so if support for these features is required, you must use the DirectX SDK version (1.3).

    To use the full featured down level XINput API, you should# include the specific XINput heads from the DirectX SDK directly:

    # include<% DXSDK_ DIR% Include xinput. h>

    . and in your linker options for Additional Dependencies, link directly to the DirectX SDK XINput library:

    %DXSDK_ DIR% Include < Arch> Xinput.lib.

    The XINPUT1_ 3. DLL binary is installed to the Windows system directories by the DirectX SDK installation on your development computer You will need to redistribute this binary with your application using the DirectX Setup installation from the DirectX SDK.

  3. Any project that uses the XAudio2 API and is intended to run on Windows 7 or older versions of Windows needs to use either the older version (9.1.0) or explicitly includes the headers and libraries for this component from the DirectX SDK The XAudio2 headers and libraries that are included with the Windows SDK target only the version (2.8) that is included as part of Windows 8.

    For example, with XAudio2, you should# include the specific XAudio2 heads from the DirectX SDK directly:

    # include<% DXSDK_ DIR% Include xaudio2. h>

    . and in your linker options for Additional Dependencies, link directly to the DirectX SDK XAudio2 library:

    %DXSDK_ DIR% Include < Arch> Xaudio2. lib.

    The XAUDIO2_ 7. DLL binary is installed to the Windows system directories by the DirectX SDK installation on your development computer You need to redistribute these libraries with your application using the DirectX Setup installation from the DirectX SDK.

  4. If you've used the DirectX SDK with past versions of Visual Studio, the Visual Studio 2010 upgrade might have migrated the DirectX SDK path into your default project settings It is recommended that you remove these settings to prevent future build errors In the% USERPROFILE% AppData Local Microsoft MSBuild v4.0 directory, modify the Microsoft Cpp Wins2. user and Microsoft. Cpp. x64. userfiles to remove all references to DXSDK_ DIR paths Alternately, you can remove the entire< PropertyGroup> Node that contains the Path entries such as< ExecutablePath> And< Include Path> To reverse to standard defaults If you don't see references to DXSDK_ DIR in these files, no changes are necessary.

  5. If the results app supports Windows Vista with Service Pack 2 (SP2) as well as Windows 7 and Windows 8 and later, set the Preprocessor Definition named_ WIN32_ WINNT to 0x600 If it only supports Windows 7 and Windows 8 and later, set it to 0x601.

    For example:

    1. Open Properties for the project and select C/C++ > Preprocessor
    2. Select All Configuration and All Platforms
    3. Go to the Preprocessor Definitions section and set_ WIN32_ WINNT; 0x600
    4. Click Apply