You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用CMake编译ParaView源码遇Qt6 Core5Compat组件缺失错误的解决咨询

解决CMake编译ParaView时Qt6 Core5Compat组件缺失的问题

错误信息

CMake Warning at VTK/CMake/vtkModule.cmake:4810 (find_package):
  Found package configuration file:

    C:/Qt/6.6.0/mingw_64/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find required Qt component "Core5Compat".

  Expected Config file at
  "C:/Qt/6.6.0/mingw_64/lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfig.cmake"
  does NOT exist



  Configuring with --debug-find-pkg=Qt6Core5Compat might reveal details why
  the package was not found.

  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
  of the path variables that find_package uses to try and find the package.

Call Stack (most recent call first):
  Qt/Widgets/CMakeLists.txt:94 (vtk_module_find_package)


CMake Error at VTK/CMake/vtkModule.cmake:4816 (message):
  Could not find the Qt6 external dependency.
Call Stack (most recent call first):
  Qt/Widgets/CMakeLists.txt:94 (vtk_module_find_package).

解决步骤

  • 补装Qt6 Core5Compat组件

    1. 打开Qt安装目录下的MaintenanceTool.exe(比如C:\Qt\MaintenanceTool.exe)
    2. 选择「添加或移除组件」,找到Qt 6.6.0 -> MinGW 64-bit,展开「Additional Libraries」,勾选「Qt 5 Compatibility Module」(该模块包含Core5Compat)
    3. 完成安装,确认C:/Qt/6.6.0/mingw_64/lib/cmake/Qt6Core5Compat路径存在,且包含Qt6Core5CompatConfig.cmake文件
  • 清理CMake缓存并重新配置

    1. 删除之前生成的CMake构建目录中的所有文件(重点删除CMakeCache.txt)
    2. 重新运行CMake命令,可手动指定Qt6路径确保识别正确:
      cmake -G "MinGW Makefiles" -DQt6_DIR=C:/Qt/6.6.0/mingw_64/lib/cmake/Qt6 ..
      
  • 针对C#嵌入场景的额外注意

    1. 编译ParaView时,开启PARAVIEW_BUILD_CSHARP_BINDINGS选项(如果CMake配置中有此选项),确保生成C#可用的绑定库
    2. 保持ParaView编译架构与C#项目一致(均为64位,对应使用的MinGW 64-bit工具链)

内容的提问来源于stack exchange,提问作者mayssa

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 18:46:24