当前位置:网站首页>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编译器
参考
边栏推荐
- RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
- Arthas thread command locates thread deadlock
- codeforce 158B Taxi
- codeforce 158B Taxi
- Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
- What is distributed?
- Elaborate on the operation of idea
- [pit stepping record] a pit where the database connection is not closed and resources are released
- Product axure9 (English version), prototype design and production pull-down secondary menu
- How to solve CSRF attack in laravel
猜你喜欢
随机推荐
Judge black production based on CDN and client slow log characteristics
Nacos适配oracle11g-建表ddl语句
yolov5检测小目标(附源码)
Simpledateformat thread safety issues
1.概率论-组合分析
The original cloud landed in deep water, and the cloud product family of Boyun container released four values
[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图
Console Application
【Veusz】导入CSV中的二维数据
Make a record of glib2.14 upgrading glib2.18 and the principle of the steps
MySQL on duplicate key and PgSQL on conflict (primary key) handle primary key conflicts
[pyqt5 series] modify the counter to realize control
在线JSON转CSharp(C#)Class工具
RTMP streaming exception fast recovery scheme
three. Solution to stripe shadow and grid shadow in JS
leetcode210. Schedule II 207 Curriculum topology sorting DFS BFS
【星球精选】如何高效构建 Roam 与 theBrain 间细粒度双向链接?
[AI practice] data normalization and standardization of machine learning data processing
codeforce 158B Taxi
传智教育 | 多人协作开发出现代码冲突,如何合并代码?









