Mac安裝Command Line Tools


從App Store上下載的Xcode,默認是不會安裝Command Line Tools的,Command Line Tools是在Xcode中的一款工具,可以在命令行中運行C程序。

在終端中輸入命令

xcode-select --install

會彈出提示框

  

選擇同意協議 

安裝中

 

 

安裝完成后,在終端中執行gcc -v命令查看是否安裝成功。
如果顯示如下內容,則按照成功。

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

參考地址

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM