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

无法编译Qt 6.5.0:缺失LLVMDemangle文件求助

编译Qt 6.5.0时LLVMDemangle库缺失问题的解决办法

问题描述

无法编译Qt 6.5.0,Qt 6.5.1会导致现有项目异常,但Qt维护工具已移除6.5.0版本的安装选项。已安装全部依赖,运行configure.bat时提示LLVM相关文件缺失。

环境配置

  • CMake 3.26.4
  • winlibs提供的GCC 12
  • Tiny11系统

报错信息

-- Configuring submodule 'qthttpserver'
-- Configuring submodule 'qttools'
CMake Error at C:/MinGW/lib/cmake/llvm/LLVMExports.cmake:677 (message):
The imported target "LLVMDemangle" references the file 

   "C:/MinGW/lib/libLLVMDemangle.dll.a"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
  "C:/MinGW/lib/cmake/llvm/LLVMExports.cmake"
but not all the files it references.

Call Stack (most recent call first):
  C:/MinGW/lib/cmake/llvm/LLVMConfig.cmake:267 (include)
  C:/MinGW/lib/cmake/clang/ClangConfig.cmake:10 (find_package)
  qttools/cmake/FindWrapLibClang.cmake:17 (find_package)
  qtbase/cmake/QtFindPackageHelpers.cmake:144 (find_package)
  qttools/configure.cmake:20 (qt_find_package)
  qtbase/cmake/QtFeature.cmake:592 (include)
  qttools/src/CMakeLists.txt:18 (qt_feature_evaluate_features)
-- Configuring incomplete, errors occurred!
CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:994 (message):
CMake exited with code 1.
NativeCommandExitException: Program "configure.bat" ended with non-zero exit code: 1.

已尝试的无效操作

  • 安装MinGW-w64的LLVM工具链
  • 使用官方LLVM安装程序

解决办法

  1. 跳过LibClang依赖编译
    Qt编译默认启用LibClang相关功能,可通过configure.bat参数直接禁用,绕过缺失库的检查:

    configure.bat -no-wrap-clang
    

    如果不需要qttools模块,也可以直接跳过该子模块:

    configure.bat -skip qttools
    
  2. 手动补充缺失的库文件
    检查C:/MinGW/lib/目录,确认libLLVMDemangle.dll.a是否真的缺失。若缺失,从与你当前MinGW版本匹配的LLVM预编译包中提取该文件,复制到对应目录即可。注意版本必须匹配,避免兼容性问题。

  3. 更换兼容的MinGW版本
    winlibs的GCC 12可能与Qt 6.5.0的编译逻辑存在冲突,尝试切换到Qt官方推荐的MinGW版本(如MinGW 11.2.0)。更新系统PATH环境变量,让新MinGW路径优先级高于旧路径,再重新执行编译流程。

  4. 使用预编译Qt包
    直接下载对应MinGW版本的Qt 6.5.0预编译安装包,无需自行编译,节省时间同时避免编译依赖问题。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.20 10:52:10