0

Actually this is linked to my another question, I was trying to find out why my clang cannot find the std headers then I found some people suggest using Clang's libc++. Then the first go failed as I followed the instructions here :

http://libcxx.llvm.org/

http://libcxxabi.llvm.org/

I checked out libcxx and libcxxabi to llvm/projects and then do the following:

cd llvm
mkdir build && cd build
cmake .. 
make

The error is :

cc : error: unrecognized command line option '-stdlib=libc++' 

Any help will be much appreciated.

Thanks

Community
  • 1
  • 1
rzhomx
  • 85
  • 1
  • 12
  • I think you need to install [XCode](https://developer.apple.com/xcode/downloads/) to use Clang/LLVM with OSX. – Jason Oct 01 '14 at 00:03
  • I do have XCode installed, but I think XCode uses old version of Clang which doesn't support that many C++11 features? so I tried to build my own out of XCode – rzhomx Oct 01 '14 at 00:09
  • Clang has some of the most recent C++ support of any of the compilers. You may need to pass `-std=c++11` to compile against the C++11 version of the standard. Clang support is documented [here](http://clang.llvm.org/cxx_status.html) – Jason Oct 01 '14 at 01:36
  • I'm still on OS X Lion 10.7.5 and XCode 4.6, so it seems the clang 4.2 used by the XCode still missing a lot of new features? Ok, it might be an option to upgrade my OS and XCode, but from my understanding, it should be able to build libc++ independently ? btw, I already rebuilt the clang 4.6 successfully but just missing the std libraries, so I am trying to get libc++ now. – rzhomx Oct 01 '14 at 02:24
  • The error message seems to indicate you are using GCC instead of Clang. – Yongwei Wu Oct 12 '14 at 12:22

0 Answers0