我刚刚更新到OS中的最新版本的命令行工具,现在在编译我的(以前工作的)代码时,它会抛出以下错误
> 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的参数中,我可以在哪里更改它呢?
发布于 2014-10-02 21:53:44
还可以通过在.pro文件中添加以下行来编译该项目
QMAKE_MAC_SDK = macosx10.9发布于 2014-09-21 17:43:47
为了供其他人参考,我通过编辑平台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。
尼克。
发布于 2014-10-19 18:16:31
如果您在OS以外的其他平台上编译,BRabbit27解决方案的改进将是:
macx {
QMAKE_MAC_SDK = macosx10.9
}https://stackoverflow.com/questions/25940368
复制相似问题