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

Exit Print View

Updated: July 2016
 
 

12.2 Apache stdcxx Standard Library

Use the Apache stdcxx version 4 C++ standard library in Oracle Solaris, instead of the default libCstd by compiling with -library=stdcxx4. This option also sets the -mt option implicitly. The stdcxx library requires multithreading mode. This option must be used consistently on every compilation and link command in the entire application. Code compiled with -library=stdcxx4 cannot be used in the same program as code compiled with the default -library=Cstd or the optional -library=stlport4.

Keep in mind the following when using the Apache stdcxx library:

  • The stdcxx and iostream libraries provide their own implementation of I/O streams. Specifying more than one of these with the -library option can result in undefined program behavior.

  • Tools.h++ is not supported with stdcxx.

  • The C++ Interval Math library (libCsunimath) is not supported with stdcxx.

  • The stdcxx library is binary incompatible with the default libCstd and with STLport. If you use the stdcxx implementation of the standard library, then you must compile and link all files, including third-party libraries, with the option -library=stdcxx4.

  • The stdcxx library is delivered as part of Oracle Solaris, not Oracle Developer Studio. You can build and deploy programs using stdcxx only on Oracle Solaris systems where the library is installed.