C++ User's Guide

The C Libraries

The Solaris operating environment comes with several libraries installed in /usr/lib. Most of these libraries have a C interface. Of these, the libc, libm, and libw libraries are linked by the CC driver by default. The library libthread is linked if you use the -mt option. To link any other system library, use the appropriate -l option at link time. For example, to link the libdemangle library, pass -ldemangle on the CC command line at link time:

demo% CC text.c -ldemangle

The Sun C++ 5.0 compiler has its own runtime support libraries. All C++ applications are linked to these libraries by the CC driver. The C++ compiler also comes with several other useful libraries. See "Libraries Provided With the C++ Compiler" for more information.