Go to main content
Oracle® Developer Studio 12.6: C++ User's Guide

Exit Print View

Updated: July 2017
 
 

11.2.1 C++ Library Descriptions

This section provides a brief description of each of the C++ libraries.

  • libCrun – Contains the runtime support needed by the compiler in -compat=5 mode. It provides support for new/delete, exceptions, and RTTI.

  • libCstd – The C++ standard library. In particular, this library includes iostreams. This library is the default in –compat=5 mode on Oracle Solaris. On Linux, use –compat=5 –library=Cstd to get this library. If you have existing sources that use the classic iostreams and you want to make use of the standard iostreams, you have to modify your sources to conform to the new interface.

  • libiostream – The classic iostreams library built with -compat=5. If you have existing sources that use the classic iostreams and you want to compile these sources with –compat=5, you can use libiostream without modifying your sources. Use –library=iostream to get this library.


    Note -  Much of the standard library depends on using standard iostreams. Using classic iostreams in the same program can cause problems.
  • libstlport – The STLport implementation of the C++ standard library. You can use this library instead of the default libCstd in -compat=5 mode by specifying the option -library=stlport4. However, you cannot use libstlport and libCstd in the same program. You must compile and link everything, including imported libraries, using one library or the other exclusively.

  • libstdcxx – The Apache stdcxx implementation of the C++ standard library. You can use this library instead of the default libCstd in –compat=5 mode by specifying the option –library=stdcxx4. However, you cannot use libstdcxx and libCstd in the same program. You must compile and link everything, including imported libraries, using one library or the other exclusively.

  • libgc – Used in deployment mode or garbage collection mode. Simply linking with the libgc library automatically and permanently fixes a program’s memory leaks. When you link your program with the libgc library, you can program without calling free or delete while otherwise programming normally. The garbage collection library has a dependency on the dynamic load library so specify -lgc and -ldl when you link your program.

    Additional information can be found in the gcFixPrematureFrees(3) and gcInitialize(3) man pages.

  • libdemangle – Used for demangling C++ mangled names.

  • libstdc++ – The gcc implementation of the C++ standard library, used in -std=c++03, -std=c++11, and -std=c++14 modes.

  • libgcc_s – Contains runtime support for code used in libstdc++.

  • libCrunG3 – Contains the runtime support needed by the compiler in the -std=c++03, -std=c++11, and -std=c++14 modes. It provides support for new/delete, exceptions, and RTTI.

  • libstatomic – Contains the runtime support functions needed by atomic operations. The library is used in c++11 and c++14 modes for user code and in c++03 mode for some runtime library code. Users can control the link of this library with the –xatomic option.