🌐
GNU
gcc.gnu.org › onlinedocs › libstdc++
The GNU C++ Library
This is the top level of the libstdc++ documentation set. The documentation is divided into the following three sections. Manual · Frequently Asked Questions · API and Source Documentation · Table of Contents · The GNU C++ Library Manual · I. Introduction · 1. Status · Implementation Status ·
🌐
MIT
web.mit.edu › darwin › src › modules › gcc3 › libstdc++-v3 › docs › html › faq
libstdc++-v3 FAQ
When the system's libc is itself thread-safe, a non-generic implementation of atomicity.h exists for the architecture, and gcc itself reports a thread model other than single; libstdc++-v3 strives to be thread-safe. The user-code must guard against concurrent method calls which may access any particular library object's state.
Discussions

Some questions about libc, libc++, libstdc++
What the difference between libc++ and libstdc++? libc++ is part of clang project and libstdc++ is part of GCC project. They are compatible for C++17 and older versions, but C++20 implementation is not ready, so they have differences in implemented features, we'll have to wait until they are done. How to determine which versions of these libs support specific standard version? For example which version of c++ standard does libstdc++-4.6 support? In their documentation, for example you can check what version GCC libstdc++ supports here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html Copy pasting libs may or may not work, depending on many things. It's best to just install standard library using package manager of your operating system. More on reddit.com
🌐 r/cpp_questions
7
12
September 18, 2020
Intel offers Parallel STL implementation to GNU libstdc++

The same offer was made to libc++.

More on reddit.com
🌐 r/cpp
42
217
November 30, 2017
🌐
GitHub
github.com › gcc-mirror › gcc › blob › master › libstdc++-v3 › include › precompiled › stdc++.h
gcc/libstdc++-v3/include/precompiled/stdc++.h at master · gcc-mirror/gcc
* This is an implementation file for a precompiled header. */ · // 17.4.1.2 Headers · · // C · // Don't include cassert, it's not suitable for PCH or header unit. #include <cctype> #include <cfloat> #include <climits> #include <csetjmp> #include <cstdarg> #include <cstddef> #include <cstdlib> ·
Author   gcc-mirror
🌐
Vu
bio.vu.nl › thb › links › docs › libstdc++ › faq › index.html
libstdc++-v3 FAQ
It is now possible to bootstrap g++, and have g++ find libstdc++-v3 headers and libraries by default. - Synched with CVS egcs libio. - Cygwin native compiling supported. - Cross compiling and embedded targets (newlib) with multilibs support added. - SGI's strstream implementation has been added.
🌐
Brown University
cs.brown.edu › people › jwicks › libstdc++ › html › 17_intro › howto.html
libstdc++-v3 HOWTO: Chapter 17: Library Introduction
The libstdc++-v3 library (unlike libstdc++-v2, all of it, not just the STL) has been designed so that multithreaded applications using it may be written. The first problem is finding a fast method of implementation portable to all platforms. Due to historical reasons, some of the library is written against per-CPU-architecture spinlocks and other parts against the gthr.h abstraction layer which is provided by gcc.
🌐
GitHub
github.com › gcc-mirror › gcc › tree › master › libstdc++-v3
gcc/libstdc++-v3 at master · gcc-mirror/gcc
April 2, 2020 - file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory.
Author   gcc-mirror
🌐
Llvm
libcxx.llvm.org
“libc++” C++ Standard Library — libc++ documentation
libc++ is a new implementation of the C++ standard library, targeting C++11 and above. ... Correctness as defined by the C++11 standard. Fast execution. Minimal memory use. Fast compile times. ABI compatibility with gcc’s libstdc++ for some low-level features such as exception objects, rtti ...
🌐
GNU
gcc.gnu.org › onlinedocs › libstdc++ › latest-doxygen › index.html
libstdc++ Source Documentation
August 23, 2024 - There are two types of documentation for libstdc++. One is the distribution documentation, which can be read online here or offline from the file doc/html/index.html in the library source directory.
Find elsewhere
🌐
Reddit
reddit.com › r/cpp_questions › some questions about libc, libc++, libstdc++
r/cpp_questions on Reddit: Some questions about libc, libc++, libstdc++
September 18, 2020 -

Can someone elaborate on what are libc, libc++, libstdc++

  1. What the difference between libc++ and libstdc++? Why can't we just use one of them for all times?

  2. How to determine which versions of these libs support specific standard version? For example which version of c++ standard does libstdc++-4.6 support?

  3. Can i just "copy-paste" these libs into target OS to run my project if that OS lacks newer versions of these ones available in repositories?

    1. Can i just "copy-paste" all dependent `.so` files into target OS? What should i consider when "copy-pasting" libraries from my development workstation to user's one?

Top answer
1 of 2
4
What the difference between libc++ and libstdc++? libc++ is part of clang project and libstdc++ is part of GCC project. They are compatible for C++17 and older versions, but C++20 implementation is not ready, so they have differences in implemented features, we'll have to wait until they are done. How to determine which versions of these libs support specific standard version? For example which version of c++ standard does libstdc++-4.6 support? In their documentation, for example you can check what version GCC libstdc++ supports here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html Copy pasting libs may or may not work, depending on many things. It's best to just install standard library using package manager of your operating system.
2 of 2
1
(mine) 0. What are libc++ and libstdc++ They are compiler-specific implementations of the C++ standard library. libc++ is bundled with Clang and libstdc++ with GCC. On many unix platforms Clang works with libstdc++ by default for better ABI compatibility. 1. What the difference between libc++ and libstdc++? Why can't we just use one of them for all times? They are different implementations of the same library. Your code should not really care which one it is using, unless you also want to use compiler-specific extensions. 2. How to determine which versions of these libs support specific standard version? Not sure. Look into GCC and Clang documentation. 3. Can i just "copy-paste" these libs into target OS to run my project if that OS lacks newer versions of these ones available in repositories? Can i just "copy-paste" all dependent .so files into target OS? What should i consider when "copy-pasting" libraries from my development workstation to user's one? Generally, yes but you need to take care of few things: Your executable must be able to locate the library object. This might require to edit LD_LIBRARY_PATH or inject rpath information into the executable. Licensing concerns (???) - IIRC even majority of commercial uses are fine though It's possible to use static version of the standard library - then it's inside the executable. Whatever linking you are using, the target OS must support all dependencies of the standard library implementation. This will usually be dependent on supported syscalls which are the border between user-space and kerner-space.
🌐
Red Hat
developers.redhat.com › articles › 2023 › 04 › 03 › leaner-libstdc-gcc-13
A leaner in libstdc++ for GCC 13 | Red Hat Developer
August 14, 2023 - In current versions of libstdc++, including <iostream> in a translation unit (TU) introduces a global constructor into the compiled object file, one that is responsible for initializing the standard stream objects std::cout, std::cin, etc., on program startup.
🌐
GNU
gcc.gnu.org › onlinedocs › libstdc++ › faq.html
Frequently Asked Questions
So any program which uses libstdc++ falls under the GPL? 2.3. How is that different from the GNU {Lesser,Library} GPL? 2.4. I see. So, what restrictions are there on programs that use the library? 3.1. How do I install libstdc++? 3.2. How does one get current libstdc++ sources?
🌐
Discoverer
docs.discoverer.bg › clang_pp_libstcpp_abi_compat.html
Using LLVM.org Clang compilers with libstdc++ and ABI compatibility — Discoverer HPC Docs documentation
The correct solution is to ensure ABI compatibility at compile time by using consistent standard library implementations across all components. This is simpler, more reliable, and more performant than any patching approach. Clang++ compilers can use libstdc++ by default on Linux systems, providing compatibility with GCC-compiled code when the same ABI settings are used.
🌐
Intel
intel.com › content › www › us › en › docs › dpcpp-cpp-compiler › developer-guide-reference › 2024-0 › static-libstdc.html
static-libstdc++
F (Windows*) fixed fortlib fuse-ld l L LD link MD MT nodefaultlibs no-intel-lib, Qno-intel-lib nostartfiles nostdlib pie pthread shared shared-intel shared-libgcc static static-intel static-libgcc static-libstdc++ Syntax Arguments Default Description IDE Equivalent Alternate Options See Also ...
🌐
Reddit
reddit.com › r/cpp › intel offers parallel stl implementation to gnu libstdc++
r/cpp on Reddit: Intel offers Parallel STL implementation to GNU libstdc++
November 30, 2017 - For thread-level parallelism it uses TBB* (https://www.threadingbuildingblocks.org/) but abstracts it with an internal API which can be implemented on top of other threading/parallel solutions – so it is for the community to decide which ones to use. For SIMD parallelism (unseq, par_unseq) we use #pragma omp simd directives; it is vendor-neutral and does not require any OpenMP runtime support. So, no, it doesn't have to. ... I guess the question is what those other threading/parallel solutions are. Or how complicated it is to recreate them in libstdc++ (I haven't had a look at the code, it might be totally trivial).
🌐
funwithlinux
funwithlinux.net › blog › should-i-use-libc-or-libstdc
Libc++ vs Libstdc++: Choosing the Right Standard Library for C/C++ CLI Executables on macOS & Linux with OpenCV — FunWithLinux.net
The two primary options are **Libc++** (LLVM/Clang’s implementation) and **Libstdc++** (GNU’s implementation). While both aim to comply with the C++ standard, they differ in ABI (Application Binary Interface) compatibility, OS support, and integration with tools like OpenCV.
🌐
GitHub
github.com › gcc-mirror › gcc › blob › master › libstdc++-v3 › po › libstdc++.pot
gcc/libstdc++-v3/po/libstdc++.pot at master · gcc-mirror/gcc
# Translations needed for GNU C++ library locale implementation. # Copyright (C) 2001-2026 Free Software Foundation, Inc. # This file is distributed under the same license as the libstdc++-v3 package.
Author   gcc-mirror
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 6 › html › developer_guide › lib.details
2.2. Library and Runtime Details | Developer Guide | Red Hat Enterprise Linux | 6 | Red Hat Documentation
Installing the libstdc++ package ... for C++ development, you must install libstdc++-devel as well. The libstdc++-devel package also contains a GNU-specific implementation of the Standard Template Library (STL)....
🌐
MIT
web.mit.edu › darwin › src › modules › gcc3 › libstdc++-v3 › docs › html › install.html
libstdc++-v3 Installation Instructions
If you're building GCC from scratch, you can do the usual 'make bootstrap' here, and libstdc++-v3 will be built as its default C++ library. The generated g++ will magically use the correct headers, link against the correct library binary, and in general using libstdc++-v3 will be a piece of cake.