Sun Studio 12 Update 1: C++ User's Guide

A.2.153.1 Examples

For minimal compilation to meet the C application binary interface (that is, a C++ program with only C support required), use:


example% CC– xnolib test.cc–lc

To link libm statically into a single-threaded application with the generic architecture instruction set, use:

Interactions

If you specify– xnolib, you must manually link all required system support libraries in the given order. You must link the system support libraries last.

If -xnolib is specified, -library is ignored.

Warnings

Many C++ language features require the use of libC (compatibility mode) or libCrun (standard mode).

This set of system support libraries is not stable and might change from release to release.

See also

–library, –staticlib, –l