【问题标题】:‘LIBs NOT FOUND’ Error in building Assimp with MinGW in cmake在 cmake 中使用 MinGW 构建 Assimp 时出现“未找到 LIB”错误
【发布时间】:2021-12-14 03:28:10
【问题描述】:

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

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

我收到这条消息:

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 的库。我需要一个个安装库吗?

【问题讨论】:

    标签: c++ cmake assimp


    【解决方案1】:

    您帖子中显示的所有问题都是 CMake 警告,应表明:

    • 库请求的 CMake 最低版本已过时。
    • 有些库无法在您的 devbox 上找到,因此将使用 assimp 的内部版本。

    所以从我的角度来看,您的构建将运行。要摆脱这些警告,您可以更新到最新的 assimp 大师,或者只使用来自 here 的 5.0.1 版

    【讨论】:

      猜你喜欢
      • 2019-01-11
      • 1970-01-01
      • 2021-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-01
      • 1970-01-01
      • 2013-05-25
      相关资源
      最近更新 更多