installation compiler cc or gcc in Mac OS 10.13.3

Hi,

May i know how i could get installed compiler cc or gcc in Mac high sierra v10.13.3 ?


I read in the web that it often gets broken when trying to install it in this version...

Thanks

Diana1

MacBook Pro, macOS High Sierra (10.13.3)

Posted on Jun 26, 2018 6:59 AM

Reply
1 reply

Jun 26, 2018 9:59 AM in response to diana1

Diana,


Do you require the full GNU C/C++ compilation suite, or would the more modern clang/llvm compilation suite that is offered in Xcode, or as a standalone installation meet your needs. Apple no longer includes GNU products due to their GPL3 licensing issues. The clang/llvm compiler technology does have limited, legacy (older) GNU C/C++ compatibility — even down to the gcc/g++ commands (linked to clang/llvm GNU compatibility mode) which can compile well-written C/C++ code that does not have specific GNU dependencies.


You will need one of Apple's compilation suites installed before any package manager (e.g. homebrew) will compile the compiler package. Expect this to be a long compile (speaking from past experience). The biggest challenge is pointing the GNU compilation suite at its own headers and libraries (the package manager should report these locations during the installation process) when building code, because if you don't do this, it will be attempting to access the Apple compilation suite includes and frameworks which will disappoint you.


Getting Xcode is obvious. Getting the High Sierra specific command-line compilation suite requires a free, or paid developer account (developer.apple.com), and access to the downloads. I would discourage you from downloading any beta development tools on a release operating system.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

installation compiler cc or gcc in Mac OS 10.13.3

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.