首页 > 解决方案 > assimp 编译错误:DirectX_D3DX9_LIBRARY not found 虽然安装了directX

问题描述

cmake -G "MinGW Makefiles"

给出以下错误:

Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - done
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - found
Looking for DirectX...
DirectX_PREFIX_PATH changed.
Found DirectX: C:/Windows/System32/d3d9.dll
DX lib dir: C:/Windows/System32
Looking for DirectX...
DirectX_PREFIX_PATH changed.
Found DirectX: C:/Windows/System32/d3d9.dll
DX lib dir: C:/Windows/System32
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
DirectX_D3DX9_LIBRARY (ADVANCED)

我已经安装了 DirectX,但它也不起作用。我找不到解决方案。assimp 版本是 3.3.1。我也已经尝试使用 Visual Studio 2017 编译它。

标签: makefilecmakedirectxassimp

解决方案


这个问题是由我们的旧模型查看器引起的。目前它希望在您的机器上安装旧的 DirectX9 SDK。要解决此问题,只需查找 DX-9.0a SDK(只需 google 即可)并将其安装在默认位置。

您还可以在禁用工具支持的情况下运行 cmake 脚本。然后不需要DX-SDK,问题将不再发生:

assimp_root_folder>cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF

推荐阅读