当前位置:网站首页>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编译器
参考
边栏推荐
- Ldconfig command
- TCP fastopen is used inside the origin server to quickly return to the source
- 链游飞船开发 农民世界链游开发 土地链游开发
- MySQL获取系统时间段
- Chain tour airship development farmers' world chain tour development land chain tour development
- Basic experiment of data statistics and analysis - basic grammar and operation
- MYSQL牛客刷题
- Redis setting password
- Mysql数据库的几个特点
- . H5 file forgets the database name and uses h5py to print
猜你喜欢

NTU-RGBD数据集下载及数据格式解析

Heuristic search strategy

How to quickly and gracefully download large files from Google cloud disk (II)

To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"

MYSQL牛客刷题

Nacos适配oracle11g-修改Nacos源码

MySQL on duplicate key and PgSQL on conflict (primary key) handle primary key conflicts

Akamai-1.75版本-_abck参数生成-js逆向分析

跳跃表原理

Online JSON to CSharp (c) class tool
随机推荐
Ldconfig command
Online text filter less than specified length tool
Nacos适配oracle11g-修改Nacos源码
Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
How MySQL converts a date to a number
Spock约束-调用频率/目标/方法参数
Redis setting password
Elaborate on the operation of idea
[cloud computing event] vocational skill competition -- container development example pig rapid development framework
MySQL (11) - sorting out MySQL interview questions
Principle of skip table
Online JSON to CSharp (c) class tool
HCIP之路
链游飞船开发 农民世界链游开发 土地链游开发
EXCEL VBA 入门与实用例子
MySQL(二) — MySQL数据类型
MySQL Niuke brush questions
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
279. perfect square
TCP fastopen is used inside the origin server to quickly return to the source