I have a couple of questions.
1) What is libc++
and libstdc++
?
2) What is the difference between them ?
3) Are they interchangeable ?
4) Is it something a compiler should implement ?
5) When should I use one or another ?
The term "libc" is commonly used as a shorthand for the "standard C library", a library of standard functions that can be used by all C programs (and sometimes by programs in other languages). Because of some history (see below), use of the term "libc" to refer to the standard C library is somewhat ambiguous on Linux.
libc6 and glibc are the same version of libc; officially, it's version 2 of the GNU C Library (but it's the sixth major version of the Linux C library). You can read more about glibc at the GNU C Library pages.
Most implementations of libstdc++ depend on libc, so they require it. The C++ standard includes most of the C standard library. So it's kind of a dependency and technically it's part of the C++ standard library.
libc++abi is a new implementation of low level support for a standard C++ library. All of the code in libc++abi is dual licensed under the MIT license and the UIUC License (a BSD-like license).
1) What is libc++ and libstdc++ ?
They are implementations of the C++ standard library.
2) What is the difference between them ?
They are entirely different implementations.
3) Are they interchangeable ?
Yes, you should be able to use them interchangeably. (However you can't easily use both in the same program.)
5) When should I use one or another ?
You shouldn't have to worry about that. Your code should work with any standard library implementation.
libstdc++ is the GNU c++ standard library implementation.
libc++ is the LLVM/clang c++ standard library implementation.
Even when compiling with clang, libstdc++ is often used (on Linux).
A main reason libc++ exists is that libstdc++ is GPL and so Apple can't ship it, so you can think of libc++ as the non-GPL libstdc++.
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