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

Exit Print View

Updated: July 2017

11.6 Using Shared Libraries

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

  • libCCexcept.so.1 (SPARC only)

  • libstlport.so.1

  • libstdc++.so.6

  • libgcc_s.so.1

  • libCrunG3.so.1

  • libstatomic.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, some of 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. Refer to the Oracle Developer Studio 12.6: Release Notes for information regarding the deployment of applications using libstatomic.

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 Oracle Developer Studio Libraries in an Application contains a full discussion of this topic, along with examples. It is available on the Oracle Developer Studio product site ( http://www.oracle.com/technetwork/server-storage/developerstudio/).