我发现开发人员工具不像其他工具那样容易获得。在 El Capitan 中,在终端中我只使用了 gcc-v,然后它说 gcc 不可用,并询问我是否要安装命令行 Apple Developer Tools。无需下载 Xcode。下面是最后一节:
Pauls-MBP:~ paulhillman$ gcc -v
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Pauls-MBP:~ paulhillman$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin