Sun Studio 12 Update 1: C++ User's Guide

12.6 Using Shared Libraries

The following C++ runtime shared libraries are shipped as part of the C++ compiler:

On Linux, these additional libraries are shipped as part of the C++ compiler:

On Solaris, 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 Sun Studio Libraries in an Applicationcontains a full discussion of this topic, along with examples and can be found at http://developers.sun.com/sunstudio/documentation/techart/stdlibdistr.html