繁体   English   中英

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

[英]‘LIBs NOT FOUND’ Error in building Assimp with MinGW in cmake

我正在通过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 的库。 我需要一一安装这些库吗?

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

  • 库要求的 CMake 最小版本已过时。
  • 某些库无法位于您的开发箱中,因此将使用来自assimp 的内部版本。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM