簡體   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