DirectX SDK download, installation and development environment settings

1 DirectX

DirectX (Direct eXtension, DX for short) is a multimedia programming interface created by Microsoft Corporation and is an application programming interface (API). DirectX can allow games or multimedia programs based on Windows to achieve higher execution efficiency, enhance 3D graphics and sound effects, and provide designers with a common hardware driver standard, so that game developers do not have to write for each brand of hardware. Different drivers also reduce the complexity of installing and setting up hardware for users. ——Baidu Encyclopedia

2 DirectX SDK download

Download link: Microsoft official download link - DXSDK_Jun10 (585MB)
download and run the installation. The directory structure after installation is as follows
include
, including Include, Lib, etc. for development, and Samples are provided.

3 Development environment configuration

3.1 VS series compiler

If you use Microsoft series compilers such as VS2015, VS2017, etc., in the property page of the project to be added to DX:
First, set C/C++ - General - Additional include directory, add the include directory of DX to it.
Insert image description here
Second, set the linker - General - Additional library directory, add the DX lib directory.
Insert image description here
Third, add the DX lib to be used in the linker - input - additional dependencies. I am using D3D9, so I added these two:

d3d9.lib
d3dx9.lib

If you use D3D10, D3D11, etc., or other functions of DirectX, add the corresponding LIB.

3.2 Qt series compilers

If you are using the qt compiler, add it directly to the pro file of the project. I use D3D9, so add the following:

INCLUDEPATH += "D:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"/include
LIBS += "D:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"/Lib/x64/d3d9.lib
LIBS += "D:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"/Lib/x64/d3dx9.lib

Guess you like

Origin blog.csdn.net/hangl_ciom/article/details/132040322