当前位置:网站首页>Qt工程报错:-1: error: Cannot run compiler ‘clang++‘. Output:mingw32-make.exe
Qt工程报错:-1: error: Cannot run compiler ‘clang++‘. Output:mingw32-make.exe
2022-06-23 07:00:00 【妙为】
系列文章目录
文章目录
前言
在网上下载Qt工程中在本机中,用自己的QtCreator经常会遇到各种报错
“QMAKE_CXXFLAGS+=–target=i686-w64-mingw32” “QMAKE_LFLAGS+=–target=i686-w64-mingw32”
Info: creating stash file E:\QtExercise\QtReadWriteXml\QtXmlDom\build-QtXmlDom-Qt_5_12_9_msvc2017_64_64bit-Debug.qmake.stash
10:32:20: 进程"D:\Qt\Qt5.12.9\5.12.9\msvc2017_64\bin\qmake.exe"正常退出。
10:32:20: 无法启动进程"mingw32-make.exe" -f E:/QtExercise/QtReadWriteXml/QtXmlDom/build-QtXmlDom-Qt_5_12_9_msvc2017_64_64bit-Debug/Makefile qmake_all
Error while building/deploying project QtXmlDom (kit: Qt 5.12.9 (msvc2017_64) 64bit)
The kit Qt 5.12.9 (msvc2017_64) 64bit has configuration issues which might be the root cause for this problem.
When executing step “qmake”
10:32:21: Elapsed time: 00:03.



一、报错原因
我大概总结了以下三种原因:
1.原工程是使用MinGW32/64编译器生成的
2.原工程是使用MSVC2015~msvc2019编译器生成的
3.原工程使用lang编译器生成的
其中clang编译器可能有些小伙伴比较陌生
Clang编译器是由APPLE公司的编译器大牛Chris Lattner主导下编写的,其目标是替换大名鼎鼎的GCC编译器;从XCODE4开始,也就是 Mac OS X 10.6版本系统上,Apple 宣布停止更新GCC编译器,这样GCC停留在GCC4.2版本,并建议大家使用LLVM Compiler 2.0(LLVM-Clang),该版本完全支持C++/ Objective-C++,并提供libc++库来支持新的C++ standard(C++0x标准),而GCC/LLVM-GCC支持的是GCC标准库libstdc++;
另外,由于LLVM-Clang的优秀设计,Android NDK从r11开始建议大家切换到clang。并且把GCC标记为deprecated(弃用),将GCC版本锁定在GCC 4.9不再更新;Android NDK从r13起,默认使用Clang进行编译。但是暂时也没有把GCC删掉,Google考虑 libc++(LLVM-Clang的c++标准库)还不够稳定; Android NDK 在 r17 中宣称不再支持 GCC 并在后续的 r18 中删掉 GCC。现在GCC主战场只剩Linux跟部分Windows应用软件开发。
二、解决办法
1.首先我们在安装Qt的时候,记得勾选msvc,MinGW这些编译器,由于我是在windows下开发,所有只选择了msvc,MinGW编译器
2.QtCreator配置


配置成对应的msvc或者MinGW编译器
参考
边栏推荐
- What is customer experience automation?
- U-Net: Convolutional Networks for Biomedical Image Segmentation
- three. Solution to stripe shadow and grid shadow in JS
- [AI practice] xgbgressor model accelerates training and uses GPU to train xgbgressor in seconds
- 职场必备的30套报表模板,满足95%的报表需求,一键套用无需代码
- Online JSON to CSharp (c) class tool
- EXCEL VBA 入门与实用例子
- Download the OSS file and modify the file name
- Spock constraint - call frequency / target / method parameters
- 【PyQt5系列】修改计数器实现控制
猜你喜欢
![[deep learning] [original] how to detect targets and draw map and other parameter maps without yolov5 weights or models](/img/f3/ff14cb5439a24e26f977e5f0d15785.png)
[deep learning] [original] how to detect targets and draw map and other parameter maps without yolov5 weights or models

Pagoda forgot password

How bootstrap clears floating styles

Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?

这道字符串反转的题目,你能想到更好的方法吗?

How MySQL converts a date to a number

在kubernetes中部署kubersphere

Wechat multiplayer chat and Roulette Games (websocket Implementation)

RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
![[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图](/img/f3/ff14cb5439a24e26f977e5f0d15785.png)
[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图
随机推荐
[interface automation] software testing the core skills of salary increase to increase salary by 200%
To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"
MySQL on duplicate key and PgSQL on conflict (primary key) handle primary key conflicts
[game theory] basic knowledge
小爱音箱连接网络异常解决办法
Mysql数据库的几个特点
【博弈论】基础知识
HCIP之路
Unity picture loading and saving
C WPF additional attribute implementation interface defines decorator
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
Flannel 工作原理
User mode and kernel mode
[Laoke] how should ordinary people learn technology?
【markdown】markdown 教程大归纳
异构交易场景交互流程及一致性保证
Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
Sstable details
干货来了|《PaaS》合辑抢先看~
Tp6 installation expansion