Sun Studio 12: C++ User's Guide

3.3.7 Library Options

Table 3–8 Library Options

Option 

Action 

–Bbinding

Requests symbolic, dynamic, or static library linking. 

–d{y|n}

Allows or disallows dynamic libraries for the entire executable. 

–G

Builds a dynamic shared library instead of an executable file. 

–hname

Assigns a name to the generated dynamic shared library. 

–i

Tells ld(1) to ignore any LD_LIBRARY_PATH setting.

–Ldir

Adds dir to the list of directories to be searched for libraries.

–llib

Adds liblib.a or liblib.so to the linker’s library search list.

–library=llst

Forces inclusion of specific libraries and associated files into compilation and linking. 

–mt

Compiles and links for multithreaded code. 

–norunpath

Does not build path for libraries into executable. 

–Rplst

Builds dynamic library search paths into the executable file. 

–staticlib=llst

Indicates which C++ libraries are to be linked statically. 

–xar

Creates archive libraries. 

-xbuiltin[=opt]

Enables or disables better optimization of standard library calls 

-xia

(SPARC) Links the appropriate interval arithmetic libraries and sets a suitable floating-point environment. 

-xlang=l[,l]

Includes the appropriate runtime libraries and ensures the proper runtime environment for the specified language. 

–xlibmieee

Causes libm to return IEEE 754 values for math routines in exceptional cases.

–xlibmil

Inlines selected libm library routines for optimization.

–xlibmopt

Uses library of optimized math routines. 

-xlic_lib=sunperf

(SPARC) Links in the Sun Performance LibraryTM. Note that for C++, -library=sunperf is the preferable method for linking in this library.

-xnativeconnect

Includes interface information inside object files and subsequent shared libraries so that the shared library can interface with code written in the JavaTM programming language.

–xnolib

Disables linking with default system libraries. 

–xnolibmil

Cancels– xlibmil on the command line.

–xnolibmopt

Does not use the math routine library.