Edit/Update/Note: Just let clang use libstdc++. Has been working really well for me so far.
===============================
In the past I have been able to succeed by doing something with cmake
, but just now I discovered a buildit
script inside the lib
directory of the http://llvm.org/svn/llvm-project/libcxx/trunk
project tree.
This buildit
script appears to not make use of libsupc++
which is what the cmake
approach that I took earlier used. For instance, this guide shows one cmake
incantation to produce a makefile for libc++
, which will be able to take care of compiling and installation.
My question is what is the difference between these different ways to produce the LLVM-libc++
and which one should be used? Will they behave differently?
The buildit
script does not appear to provide any help for installation. Are there directions anywhere for how to properly install the library? With my previous libc++ built with cmake, I had to always add -lc++
to the linker flags (and the path with -L
), which is not necessary in my OS X makefiles.
The libc++ website has a nice overview of the possible ways to build libc++.
I suggest using CMake + libc++abi
.
Also see the Arch Linux User Repository build script, which uses the buildit
script. I installed libc++ from that and used it with the Arch Linux Clang package succesfully by using
clang++ -std=c++11 -stdlib=libc++ -lc++abi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With