Qt – 由于缺少编译器,无法支持所有可能的目标环境。

huangapple go评论123阅读模式
英文:

Qt - Not all possible target environments can be supported due to missing compilers

问题

在升级到Qt 6.5.2和Qt Creator 11.0.0后,在我的Mac上的首选项 > Kits > Qt Versions下,我遇到了以下错误:
由于缺少编译器,无法支持所有可能的目标环境。

当我将鼠标悬停在"Not all possible..."上时,它显示:
当前不支持以下ABI:
arm-darwin-generic-mach_o-64bit

当我点击详细信息时,在ABI部分显示:
×86-darwin-generic-mach_o-64bit
arm-darwin-generic-mach_o-64bit
这解释了为什么会显示这样的错误。

问题是:项目正在构建和编译,但Qt Creator无法识别任何与Qt相关的文件或标识符。
在Qt Creator 10.0.2和Qt 6.4.2上一切正常。

macOS 12.6.8
Xcode 14.2

Apple clang版本12.0.0 (clang-1200.0.32.2)
目标:x86_64-apple-darwin21.6.0

基于Intel的2016款MacBook Pro

附带说明的截图在这里

同样的问题已经在Qt论坛上提问过。

英文:

I'm getting this error after upgrading to Qt 6.5.2 and Qt Creator 11.0.0 on my Mac under Preferences > Kits > Qt Versions:
Not all possible target environments can be supported due to missing compilers.

When I hover over "Not all possible...", it says:
The following ABIs are currently not supported:
arm-darwin-generic-mach_o-64bit

When I click on Details, under the ABI section, it says:
×86-darwin-generic-mach_o-64bit
arm-darwin-generic-mach_o-64bit
Which explains why such an error may be displayed.

The problem: projects are being built and compiled, but Qt Creator cannot identify any Qt-related files or identifiers.
It all worked well on Qt Creator 10.0.2 and Qt 6.4.2.

macOS 12.6.8
Xcode 14.2

Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin21.6.0

Intel-based 2016 MacBook Pro

Explanatory screenshots here.

The same question has been asked on Qt Forum.

答案1

得分: 0

根据在Qt论坛上关于此主题的跟进,并在那里得到@hskolgund的帮助,我不得不重新安装Xcode命令行工具。

首先,我通过sudo rm -fR /Library/Developer/CommandLineTools删除了它,然后通过xcode-select --install进行了安装。新安装的Clang编译器现在包含对arm64的支持,因此最初的“Not all possible...”问题已解决,但出现了一个新的问题重新出现

英文:

As followed up on the aforementioned topic on Qt Forum and with the help of @hskolgund there, I had to reinstall Xcode Command Line Tools.

First, I deleted it by sudo rm -fR /Library/Developer/CommandLineTools and installed by xcode-select --install. The newly installed Clang compiler now contained support for arm64 and so the initial "Not all possible..." problem was resolved, but a new one re-emerged.

huangapple
  • 本文由 发表于 2023年7月27日 16:47:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76778021.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定