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

Exit Print View

Updated: March 2015
 
 

11.2.3 Default C++ Libraries

The C++ libraries are linked by default when building an executable program, but not when building a shared library (.so). When building a shared library, all needed libraries must be listed explicitly. The -zdefs option will cause the linker to complain if a needed library is omitted, and is the default when building an executable program. In default -compat=5 mode, the following libraries are linked by default by the CC driver:

-lCstd -l Crun -lm -lc

In -std=c++03 and -std=c++11 modes, the following libraries are linked by default by the CC driver:

-lstdc++ -lgcc_s -lCrunG3 -lm -lc

See -library=l[,l...] for more information.