Menu
Dec 11, 2017. Clang compiler not working on terminal Mac OSX. Ask Question Asked 3 years, 6 months ago. Active 3 years, 6 months ago. Apple bootcamp on windows 10. Viewed 962 times 0. I just upgraded to El Capitan and found out that the C compiler (Clang) is not working under the command line. I wrote a 'hello word' test, tried to.
Download/Install the Clang Compilers
Clang is the C/C++ complier that we will use in ICS-46. The version I installed (on 9/16/2016) is Apple version LLVM 6.0 (clang-600.0.57) (based on LLVM 3.5svn).
After following the instruction here, you will download a version of CLion, an Integrated Development Environment (IDE) for using these compilers (or you can choose to use these compilers via a command-line). In the process, you will also install Xcode's command line developer tools.
You may want to print these instructions before proceeding, so that you can refer to them while downloading and installing the Clang compilers. Or, just keep this document in your browser. You should read each step completely, before performing the action that it describes.
Clang Compilers
Downloading and Installing
- Open a Terminal window. Enter the command clang --version to see if the Clang compilers are already installed.
- If you want to install or update the Clang compilers, enter the command command xcode-select --install The following pop-up windout should appear on your screen (in this example I have placed it withing the Terminal window).
- Click the Install button. The following License Agreement pop-up window should appear on your screen.
- Click the Agree button. The following progress bar pop-up window should appear on your screen.When it is finished (in about a minute, as it says) The following pop-up window should appear on your screen.
- Click Done.
- You can double-check the installation in the Terminal by entering the command clang --version to see if the (udpated) Clang compilers are now installed. Here is what this command generated when I entered it.
If this worked as it should, you are now ready to install the CLion IDE
Mac users with macOS Mojave and macOS Catalina, and new operating systems in place can now install Command Line Tools from the Xcode IDE without needing to install the entire Xcode package, or opening an Apple developers account.
In this article, we cover how you can install this optional and highly useful Command Line Tools package.
X code 11. Credit: developerinsider
Update Clang On Mac
What is the Xcode Command Line Tools package?
![Download clang for mac terminal commands Download clang for mac terminal commands](/uploads/1/2/6/7/126781213/892379255.png)
For Mac power users — we wouldn't recommend downloading this unless you are comfortable with Terminal — the Xcode Command Line Tools package gives you a complete Unix toolkit accessible through Terminal. No developer account needed and you don't need to download the entire — and quite large Xcode package of executables.
Within the Xcode Command Line toolkit, Mac users gain access to numerous useful tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, and many others. All of these commands are a default part of Linux systems and programs.
We recommend following these steps for those with the following operating systems running on a Mac: macOS 10.13 High Sierra, macOS 10.14 Mojave, and macOS 10.15 Catalia onward. It isn't always possible to download these Xcode Command Line Tools, following these steps, on Mac’s running older operating systems. Other ways to install command tools and gcc (without needing Xcode) is available through the Apple Developer website.
![Clang format mac Clang format mac](/uploads/1/2/6/7/126781213/453051866.gif)
Here is how you install Xcode Command Line Tools.
How to install Xcode Command Line Tools?
- Go to Terminal in /Applications/Utilities/.
- Input the following command string in Terminal:
xcode-select —install
- In the same way when you are downloading new software and apps, a popup update window will appear asking you: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?”
- Select confirm by clicking Install.
- Wait for the Xcode Command Line Tools package to install. It is around 130 MB and usually installs fairly quickly; although it depends on your connection.
- Once everything is installed, the installer goes away and you should be able to any of the new commands that you’ve now got access to. Enjoy using your new Unix command line tools!
Download Clang For Mac Terminal Commands
With this new download, you should have access to 61 Unix command line tools. For example, one of the advantages of having these tools is you can install new apps and software directly from the source code instead of needing to go through the package manager and usual download route.
To access or view everything you've now got, go to the following directory:
Download openvpn connect client mac download.
/Library/Developer/CommandLineTools/
Please note, this is the root /Library of your macOS/OS X, not the ~/Library directory.
All of these tools can also be found in:
/Library/Developer/CommandLineTools/usr/bin/
Install Clang On Mac
What happens if I encounter problems downloading these?
If you get an error message that says “Can’t install the software because it is not currently available from the Software Update server”, it means you've already got the Xcode package on your Mac. Mac OS X 10.9 onward, Xcode was already installed, which is why you aren't able to download these tools. However, what you can do is uninstall the entire Xcode app if you'd prefer to only access these tools and not a whole load of software that isn’t going to be of much use.
Watch out for Xcode junk
The Xcode junk is one of those types of clutter that is keeps accumulating in remote places on your Mac. It could take up a few gigs of your space. The only app that seems to address this problem is CleanMyMac X by MacPaw. It’s loved by many Mac developers because it collects those specific types of development junk, like Xcode or outdated libraries.
Once you launch the app, click on System Junk > Scan. Then, click “Review Details” Hyper-v install mac os.
CleanMyMac X is a powerful Mac performance improvement app. It makes your Mac as good as new. Let it scan your system and clear out any unwanted Xcode, development and system junk that is taking up too much space and cluttering up your Mac. In a few clicks, your Mac could be running smoother, quicker and more efficiently.