gpt4 book ai didi

osx-mavericks - Qt5 未找到目标条件

转载 作者:行者123 更新时间:2023-12-03 07:28:39 26 4
gpt4 key购买 nike

我刚刚更新到 OS X Mavericks 中的命令行工具的最新版本,现在在编译我的(以前工作的)代码时,它会抛出以下错误

> clang: warning: no such sysroot directory:
> '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'
> In file included from ../QtOpenGL/Main.cpp:1: In file included from
> ../../Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1:
> In file included from
> ../../Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:45:
> In file included from
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qcoreapplication.h:45:
> In file included from
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qglobal.h:76:
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qsystemdetection.h:196:12:
> fatal error: 'TargetConditionals.h' file not found
> # include <TargetConditionals.h>
> ^ 1 error generated. make: *** [Main.o] Error 1 20:29:52: Le processus "/usr/bin/make" s'est terminé avec le code 2. Erreur lors
> de la compilation/déploiement du projet QtOpenGL (kit : Desktop Qt
> 5.3.0 clang 64bit) When executing step "Make"

有谁知道如果改变这一行

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

从 sdk 8 到 9 可以工作吗?如果是这样,我可以在Qt5的参数中哪里更改它?

最佳答案

供其他人引用,我通过编辑平台 mkspec 文件解决了该问题:

/users/nic/Qt/5.3/clang_64/mkspecs/qdevice.pri

更改以下行:

!host_build:QMAKE_MAC_SDK = macosx10.8

对此:

!host_build:QMAKE_MAC_SDK = macosx10.9

请务必清理您的项目并再次运行 qmake。

尼克。

关于osx-mavericks - Qt5 未找到目标条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25940368/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com