D3DX is not considered the canonical API for using Direct3D in Windows 8 and later and therefore isn't included with the corresponding Windows SDK. Investigate alternate solutions for working with the Direct3D API. For legacy projects, such as the Windows 7 (and earlier) DirectX SDK samples, the following steps are necessary to build applications with D3DX using the DirectX SDK:app
1、在https://www.microsoft.com/en-us/download/details.aspx?id=6812下载DirectX SDK,而后运行安装。ide
2、设置环境变量DXSDK_DIR=C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)ui
3、在Visual Studio 2015中右键工程名,选择属性->VC++目录3d
1,选择“全部配置”,“全部平台”下拉选项it
2,设置“包含目录”为“$(IncludePath);$(DXSDK_DIR)\Include;","库目录”为“$(LibraryPath);$(DXSDK_DIR)\Lib\x86;",点击”应用“io
3,选择平台为“x64”,库目录设置为“$(LibraryPath);$(DXSDK_LIB)\Lib\x64;",点击"应用”变量
另外任何用到d3dx11.h的地方,必须显式地包含d3d11.h和dxgi.h,以确保你使用的是最新版本。移除DXGIType.h,由于其已经不存在于Windows SDK,DirectX SDK版本与最新的winerror.h冲突。配置