Configuration of DirectX in VS2012 and above

Due to its wide range of application scenarios, DirectX has been integrated into VS2012 and above versions by Microsoft. Therefore, using DirectX for development in these versions does not require any configuration, only adding corresponding header files and dynamic link libraries when needed
However, due to the fact that many tutorials still use DirectX9, such as "Game Programming from scratch" written by Asahi Daishin, d3dx9 (a set of auxiliary libraries packaged on top of D3D) is often used, and it seems that this auxiliary library is not integrated into VS, so it is quite cumbersome. To solve this problem, it is still necessary to download, install, and configure DirectX like VS2010 and previous versions
Download address: https://www.microsoft.com/en-us/download/details.aspx?id= ; 6812
During the installation process, the following errors usually occur (if they do not occur, don't worry):




This is because the computer has installed an updated version of VC++ Caused by the 2010 runtime library, it can be resolved through
Control Panel -> Program -> Programs and Features Find the runtime library, which is divided into two versions: 32-bit and 64 bit, as follows:


Uninstall both of them and reinstall them
The configuration section is relatively simple Add header folder path to the included directory: C: Program Files (x86) Microsoft DirectX SDK (June 2010) Include (varies depending on installation version and location)
Add the library directory folder path to the library directory: C: Program Files (x86) Microsoft DirectX SDK (June 2010) Lib x86 (varies depending on installation version and location)
Add corresponding header files and dynamic link libraries when needed.