0

My /usr/bin/ directory contains an older version of clang++:

$ which clang++
/usr/bin/clang++
$ clang++ --version
Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

However, the version of clang++ used by Xcode is newer:

$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

How do I install the clang++ compiler used by Xcode into /usr/bin/? Also, all newer libraries (e.g., C++11) should be installed into their appropriate directories. I'm trying to develop software using the command-line tools (not the Xcode IDE).

redcurry
  • 2,381
  • 2
  • 24
  • 38

1 Answers1

0

Executive Summary:
The most recent Command Line Tools has to be installed. In order to obtain the installation file for 10.8.5, download it from the Apple Developer site.

Details:
I am currently running OS X Mavericks on my MacBook Pro. However, when creating platform independent C++ code and the respective tests in CppUnit, I followed directions for using NetBeans 7.4 and the respective OS X Command Line Tools installation from the Apple Developer site. When at the Apple Developer site, search using command line tools to obtain the most recent installation file for Mountain Lion.

Here is a more direct dedicated Xcode link. Then click the View Downloads link when there. Remember an Apple Developer account is necessary (it is free).

Both of these links are from the more detailed Stack Overflow post Xcode 4.4 and later install Command Line Tools, where the comments address older versions of OS X.

Note that the Apple wording of Requires Mac OS X 10.7.3 or later means that version and the more recent ones (e.g. 10.7.4, 10.8.5, 10.9.2, etc.).

Community
  • 1
  • 1