Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

11.6 Using Shared Libraries

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

  • libCCexcept.so.1 (SPARC Solaris only)

  • libstlport.so.1

  • libstdc++.so.6

  • libgcc_s.so.1

  • libCrunG3.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 the latest Oracle Solaris releases, these additional libraries, along with some others, are installed as part of the Oracle 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 runpath pointing 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. It is available at http://www.oracle.com/technetwork/articles/servers-storage-dev/redistrib-libs-344133.html