2016-04-29 100 views
2

我试图在OS X v10.11上安装Qt。我正在使用安装程序qt-unified-mac-x64-2.0.3-online。它现在显示一张表:在OS X上安装Qt Creator

您需要安装Xcode版本5.0.0。从https://developer.apple.com/xcode

试图以关闭片(按压 “OK”)使其再现
下载的Xcode。

当前版本的Xcode是7.3。尽我所知,它只能通过App Store获得,因此只能下载最新版本。

This page 6个月前宣称不支持Xcode 7。然而,该页面引用this page作为源,并且该源页面仅表示需要Clang。 “Xcode”不会出现在页面上。

我有锵:

$ which clang 
/usr/bin/clang 

$ clang -v 
Apple LLVM version 7.3.0 (clang-703.0.29) 
Target: x86_64-apple-darwin15.4.0 
Thread model: posix 
InstalledDir: /Library/Developer/CommandLineTools/usr/bin 

...但Qt的在线安装程序不会让我继续。

我需要在OS X上安装以获得Qt Creator安装和运行的最低软件是什么?


更新:我张贴了这个问题,按下 “OK” 大约4次。发布问题后,我大约再次按下“OK”约5次。最终,它消失了,并允许继续安装。 (!)

但是,当我尝试构建项目时,Qt Creator抱怨“Xcode设置不正确,您可能需要通过运行/usr/bin/xcodebuild来确认许可协议。”

运行该命令显示:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer 
directory '/Library/Developer/CommandLineTools' is a command line tools instance 

所以它看起来像我确实需要的Xcode。

回答

2

我也有这个问题。看来我也安装了XCode命令行工具,并且有一种方法可以在它们之间进行选择:

$ xcodebuild 
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance 

$ xcode-select -p # Print currently selected xcode tools 
/Library/Developer/CommandLineTools 

$ sudo xcode-select -s /Applications/Xcode.app # Select the XCode app. 

之后,它工作。