Indicates which C++ libraries are to be linked statically.
l must be one of the following:
Value of l |
Meaning |
---|---|
[no%]library |
See -library for the allowable values for library. |
%all
|
All libraries specified in the -library option are linked statically. |
%none |
Link no libraries specified in the -library option, statically. |
If -staticlib is not specified, -staticlib=%none is assumed.
The following command line links libCrun statically because Crun is a default value for -library:
demo% CC -staticlib=Crun
However, the following command line does not link libgc because libgc is not linked unless explicitly specified with the -library option:
demo% CC -staticlib=gc
To link libgc statically, use the following command:
demo% CC -library=gc -staticlib=gc
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.
This set of libraries is not stable and might change from release to release.
-library, "Statically Linking Standard Libraries"