Installing the Mac C++ Compiler

This document will help you download and install clang, the Mac C++ compiler.
  1. Open a Terminal window. (This can be done by clicking the magnifying glass in the upper-right part of the menu bar [Spotlight] and typing the word "terminal" in the box that appears. Press enter, and the Terminal window will open.)

  2. Enter the command xcode-select --install (or you can cut and paste it from here) and press enter. The following pop-up window should appear on your screen.

    If instead you see the message "xcode-select: error: command line tools are already installed, use "Software Update" to install updates," then open the App Store and check to see if there are any software updates available for Xcode. If not, then you're all done, and you can proceed to the directions for installing CLion.

  3. Click "Install." The license agreement window will appear. Click "Agree." After the software is installed, you will see a message telling you so.

  4. Click "Done."

  5. At this point the clang C++ compiler is installed. If you want to double check, in the Terminal window, you can type the command clang --version to make sure. The output should look something like this:

Continue with directions to install CLion.