1、XCode下载
XCode下载地址:https://developer.apple.com/download/more/
点击跳转链接、下载列表页如下所示:
文件比较大,需要耐心下载
2、Command Line Tools
Command Line Tools是在Xcode中的一款工具,可以在命令行中运行C程序。
打开终端输入:
xcode-select --install
安装好了测试结果:
gcc -v
显示如下:
xcode-select: note: install requested for command line developer tools
apple-1tekiiMac:~ apple-1$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)