3. Using the C++ Compiler Options
6. Creating and Using Templates
9. Improving Program Performance
10. Building Multithreaded Programs
11.2 Libraries Provided With the C++ Compiler
11.2.1 C++ Library Descriptions
11.2.2 Accessing the C++ Library Man Pages
11.5 Statically Linking Standard Libraries
11.7 Replacing the C++ Standard Library
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
The following C++ runtime shared libraries are shipped as part of the C++ compiler:
libCCexcept.so.1 (SPARC Solaris only)
libcomplex.so.5 (Solaris only)
librwtool.so.2
libstlport.so.1
On Linux, these additional libraries are shipped as part of the C++ compiler:
libCrun.so.1
libCstd.so.1
libdemangle.so
libiostream.so.1
On Solaris 10, those additional libraries, along with some others, are installed as part of the Solaris C++ runtime library package, SUNWlibC.
If your application uses any of the shared libraries that are shipped as part of the C++ compiler, the CC driver arranges for a runpath (refer to the -R option) pointing to the location of the library to be built into the executable. If the executable is later deployed to a different computer where the same compiler version is not installed in the same location, the required shared library will not be found.
At program start time, the library might not be found at all, or the wrong version of the library might be used, leading to incorrect program behavior. In such a case, you should ship the required libraries along with the executable, and build with a runpath that points to where they will be installed.
The article Using and Redistributing Solaris Studio Libraries in an Application contains a full discussion of this topic, along with examples and can be found at http://developers.sun.com/sunstudio/documentation/techart/stdlibdistr.html