assimp编译错误:尽管安装了DirectX,但找不到DirectX_D3DX9_LIBRARY

时间:2018-12-29 11:47:24

标签: makefile cmake directx assimp

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对其进行编译。

1 个答案:

答案 0 :(得分:0)

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

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

assimp_root_folder>cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
相关问题