当前位置:网站首页>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编译器
参考
边栏推荐
- Nacos适配oracle11g-修改Nacos源码
- EXCEL VBA 入门与实用例子
- [AI practice] xgb Xgbregression multioutputregressor parameter 2 (GPU training model)
- Download the OSS file and modify the file name
- Arthas-thread命令定位线程死锁
- To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"
- char和varchar区别
- MySQL Niuke brush questions
- HCIP之路第八次实验
- 20BN-Jester完整数据集下载
猜你喜欢
![[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图](/img/f3/ff14cb5439a24e26f977e5f0d15785.png)
[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图

Eureka服务注册与发现

yolov5检测小目标(附源码)
![[interface automation] software testing the core skills of salary increase to increase salary by 200%](/img/22/be8c5c922307225c34f6205f189c33.png)
[interface automation] software testing the core skills of salary increase to increase salary by 200%

【云计算赛项】职业技能竞赛--容器开发部分例题Pig快速开发框架

Online JSON to CSharp (c) class tool

C WPF additional attribute implementation interface defines decorator

vs在连接SQL时出现的问题myconn.OPen();无法运行

Cirium has gradually become the standard for airlines' carbon dioxide emission reporting

JS to determine the added and decreased elements of two arrays
随机推荐
[* * * array * * *]
Pagoda forgot password
YGG 西班牙 subDAO——Ola GG 正式成立
Akamai-1.75版本-_abck参数生成-js逆向分析
作为思摩尔应对气候变化紧急事件的一项举措,FEELM加入碳披露项目
在kubernetes中部署kubersphere
WPS for thesis writing installs MathType plug-in to write mathematical formulas
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
What is distributed?
‘latin-1‘ codec can‘t encode characters in position 103-115: Body (‘一串中文‘) is not valid Latin-1
Spock-sub打桩
[AI practice] xgbgressor model accelerates training and uses GPU to train xgbgressor in seconds
U-Net: Convolutional Networks for Biomedical Image Segmentation
《一周的朋友》
【AI实战】xgb.XGBRegressor之多回归MultiOutputRegressor调参1
Data types in tensorflow
Redis设置密码
How MySQL converts a date to a number
用户态和内核态
【AI实战】XGBRegressor模型加速训练,使用GPU秒级训练XGBRegressor