C++ User's Guide

Interactions

If you select C++ libraries explicitly with the -library option or implicitly through its defaults, you must also specify -staticlib to link these libraries statically. If a you specify a library with -staticlib but have not selected it with -library or its defaults, the library is not linked. Refer to the examples.

In the Solaris 7 operating environment, some C++ libraries are not available as static libraries.