我刚刚更新到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/