xcode - 在构建qt项目时“no such sysroot directory”

标签 xcode macos qt

MacOS Mojave 版本10.14(18A389)。

今天,我将Xcode更新为版本10.0(10A255)。当我尝试构建我的Qt项目时结束,我得到一个错误:

clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk' [-Wmissing-sysroot]
In file included from ../greed/timediagram.cpp:1:
In file included from ../../../Qt/5.9.1/clang_64/lib/QtGui.framework/Headers/QtGui:3:
In file included from /Users/arsenyspiridonov/Qt/5.9.1/clang_64/lib/QtGui.framework/Headers/QtGuiDepends:3:
In file included from /Users/arsenyspiridonov/Qt/5.9.1/clang_64/lib/QtCore.framework/Headers/QtCore:4:
In file included from ../../../Qt/5.9.1/clang_64/lib/QtCore.framework/Headers/qglobal.h:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:202:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
#include_next <string.h>
              ^~~~~~~~~~
1 error generated.
make: *** [timediagram.o] Error 1
16:13:47: Процесс «/usr/bin/make» завершился с кодом 2.
Ошибка при сборке/установке проекта greed (комплект: Desktop Qt 5.9.1 clang 64bit)
Во время выполнения этапа «Сборка»

有什么问题?如何解决?

最佳答案

在您的.pro文件中添加“QMAKE_MAC_SDK = macosx10.14”,然后从一个或多个构建目录中手动删除.qmake.stash。

关于xcode - 在构建qt项目时“no such sysroot directory”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52385658/

相关文章:

macos - 在 Mac OS X(任何方言)上安装 lisp 的建议?

c++ - 从 QGraphicsScene 上的 QGraphicsLinearLayout 中删除 QGraphics 项目

ios - Appium,仪器在启动时崩溃

swift - SearchController - 我不希望在用户尚未开始输入时显示数据

linux - Mac OS 或 Linux - 更改年份但保持月日小时和秒数不变

c++ - 如何用QPainter绘制单色椭圆(无黑边)

c++ - 如何在我的 QMainWindow 中使用我自定义的最小化/关闭窗口按钮?

ios - 尝试设置配置文件,但设备已锁定

ios - 简单的 SwiftUI 代码产生 : UIViewAlertForUnsatisfiableConstraints. 为什么?

java - 如何使用适用于 Mac 的 Oracle 新 1.7 JDK 运行 Eclipse?