JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C++ User's Guide
search filter icon
search icon

Document Information

Preface

Part I C++ Compiler

1.  The C++ Compiler

2.  Using the C++ Compiler

3.  Using the C++ Compiler Options

Part II Writing C++ Programs

4.  Language Extensions

5.  Program Organization

6.  Creating and Using Templates

7.  Compiling Templates

8.  Exception Handling

9.  Improving Program Performance

10.  Building Multithreaded Programs

Part III Libraries

11.  Using Libraries

11.1 The C Libraries

11.2 Libraries Provided With the C++ Compiler

11.2.1 C++ Library Descriptions

11.2.2 Accessing the C++ Library Man Pages

11.2.3 Default C++ Libraries

11.3 Related Library Options

11.4 Using Class Libraries

11.4.1 The iostream Library

11.4.2 The complex Library

11.4.3 Linking C++ Libraries

11.5 Statically Linking Standard Libraries

11.6 Using Shared Libraries

11.7 Replacing the C++ Standard Library

11.7.1 What Can Be Replaced

11.7.2 What Cannot Be Replaced

11.7.3 Installing the Replacement Library

11.7.4 Using the Replacement Library

11.7.5 Standard Header Implementation

11.7.5.1 Replacing Standard C++ Headers

11.7.5.2 Replacing Standard C Headers

12.  Using The C++ Standard Library

13.  Using the Classic iostream Library

14.  Using the Complex Arithmetic Library

15.  Building Libraries

Part IV Appendixes

A.  C++ Compiler Options

B.  Pragmas

Glossary

Index

11.2 Libraries Provided With the C++ Compiler

Several libraries are shipped with the C++ compiler. Some of these libraries are available only in compatibility mode (-compat=4), some are available only in the standard mode (–compat=5), and some are available in both modes. The libgc and libdemangle libraries have a C interface and can be linked to an application in either mode.

The following table lists the libraries that are shipped with the C++ compiler and the modes in which they are available.

Table 11-1 Libraries Shipped With the C++ Compiler

Library
Description
Available Modes
libstlport
STLport implementation of the standard library.
–compat=5
libstlport_dbg
STLport library for debug mode
–compat=5
libCrun
C++ runtime
–compat=5
libCstd
C++ standard library
–compat=5
libiostream
Classic iostreams
–compat=5
libC
C++ runtime, classic iostreams
–compat=4
libcsunimath
Supports the -xia option
–compat=5
libcomplex
complex-number library
–compat=4
librwtool
Tools.h++ 7
–compat=4,– compat=5
librwtool_dbg
Debug-enabled Tools.h++ 7
–compat=4,–compat=5
libgc
Garbage collection
C interface
libdemangle
Demangling
C interface

Note - Do not redefine or modify any of the configuration macros for STLport, Rogue Wave or Solaris Studio C++ libraries. The libraries are configured and built in a way that works with the C++ compiler. libCstd and Tool.h++ are configured to inter-operate so modifying the configuration macros results in programs that will not compile, will not link, or do not run properly.


11.2.1 C++ Library Descriptions

A brief description of each of these libraries follows.

11.2.2 Accessing the C++ Library Man Pages

The man pages associated with the libraries described in this section are located in sections 1, 3, 3C++, and 3cc4.

To access man pages for the C++ libraries, type:

example% man library-name

To access man pages for version 4.2 of the C++ libraries, type:

example% man -s 3CC4 library-name

11.2.3 Default C++ Libraries

Some of the C++ libraries are linked by default by the CC driver, while others need to be linked explicitly. In the standard mode, the following libraries are linked by default by the CC driver:

-lCstd -lCrun -lm -lc

In compatibility mode (-compat), the following libraries are linked by default:

-lC -lm -lc

See A.2.49 -library=l[,l...] for more information.