can't find d3dx11.h

  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衝突。配置

相關文章
相關標籤/搜索