首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在cmake中使用MinGW构建Assimp时出现“with未找到”错误

在cmake中使用MinGW构建Assimp时出现“with未找到”错误
EN

Stack Overflow用户
提问于 2021-10-29 00:35:02
回答 1查看 96关注 0票数 0

我正在学习https://learnopengl.com/教程中的OpenGL。我需要在cmake-gui中构建Assimp。我是Cmake的新手,以前从未用过它。我遇到了一些令人困惑的错误,似乎我遗漏了一些重要的库,或者cmake找不到库的根。

我的环境是MinGW v8.1.0、cmake v3.19.2、Assimp v4.1.0、Windows10

我得到了这样的信息:

代码语言:javascript
复制
Shared libraries enabled
Looking for DirectX...
DirectX_PREFIX_PATH changed.
Found DirectX: F:/dxsdk/Lib/x86/d3d9.lib
DX lib dir: F:/dxsdk/Lib/x86
Looking for ZLIB...
Checking for module 'zzip-zlib-config'
  No package 'zzip-zlib-config' found
Could not locate ZLIB
compiling zlib from souces
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:8 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


Checking for module 'minizip'
  No package 'minizip' found
CMake Deprecation Warning at code/CMakeLists.txt:46 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at F:/cmake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (rt) does
  not match the name of the calling package (RT).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-modules/FindRT.cmake:19 (find_package_handle_standard_args)
  code/CMakeLists.txt:807 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find rt (missing: RT_LIBRARY) 
INFO RT-extension not found. glTF import/export will be built without Open3DGC-compression.
Enabled formats: AMF 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
Disabled formats:
CMake Deprecation Warning at tools/assimp_view/CMakeLists.txt:39 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Looking for DirectX...
DirectX_PREFIX_PATH changed.
DX lib dir: F:/dxsdk/Lib/x86
CMake Deprecation Warning at tools/assimp_cmd/CMakeLists.txt:39 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at F:/cmake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (IL) does
  not match the name of the calling package (DevIL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-modules/FindDevIL.cmake:71 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:421 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find IL (missing: IL_LIBRARIES IL_INCLUDE_DIR) 
CMake Warning at CMakeLists.txt:439 (MESSAGE):
  Build of assimp_qt_viewer is disabled.  Unsatisfied dendencies: Qt5 DevIL


CMake Deprecation Warning at test/CMakeLists.txt:39 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Configuring done

我安装了ZLIB和指向ZLIB_INCLUDE_DIR,但似乎需要更多关于ZLIB的库。是否需要逐个安装库?

EN

回答 1

Stack Overflow用户

发布于 2021-10-29 08:35:58

您的帖子中显示的所有问题都是CMake-warnings,这将表明:

  • 库所需的CMake最低版本已过期。
  • 在您的devbox上找不到某些库,因此将使用assimp的内部版本。

因此,从我的角度来看,您的构建应该运行。要消除这些警告,您可以更新到assimp的最新版本,或者使用here的5.0.1版本

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69762369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档