我刚刚安装了Qt5.5,并且是第一次在OS上使用Qt Creator。当我第一次安装Qt时,它给了我一个错误信息'Xcode 5 not installed‘,我认为这很奇怪(我有Xcode7测试版),但无论如何安装都成功完成了。
现在,当我启动或打开一个项目时,我得到一个错误:
项目错误: Xcode设置不正确。您可能需要通过运行/usr/bin/xcodebuild来确认许可协议。
当我在终端中运行/usr/bin/xcodebuild
时,我得到了以下信息:
xcode-select:错误:工具'xcodebuild‘需要Xcode,但active developer目录'/Library/Developer/CommandLineTools’是命令行工具实例
我不确定Xcode与Qt Creator有什么关系,除非它与访问跨平台兼容性的库有关,但有办法解决这个问题吗?
发布于 2016-09-21 18:55:41
如果您更改Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
的内容,那么它将只适用于桌面套件,而不适用于ex。模拟器。
更好的方法是创建symlink:
cd /Applications/Xcode.app/Contents/Developer/usr/bin/
sudo ln -s xcodebuild xcrun
因此,您不必更改所有目标的.prf文件。
发布于 2015-11-29 02:57:03
这将会起到作用:
#sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
在您的终端中运行此命令。
发布于 2016-09-15 04:55:20
对于Xcode8的用户来说,还有另一个问题。在Qt 5.7.1发布之前,请查看此处获取临时解决方案:
https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly
总结一下:
在文本编辑器中打开Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
,并替换为:
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))))
有了这个:
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
https://stackoverflow.com/questions/33728905
复制相似问题