JavaSolarisCommunitiesAbout SunHow to BuyMy AccountCartUnited StatesWorldwide
Sun Microsystems Documentation
docs.sun.com
Browse Documentation Titles
Browse Product Documentation
Help

Linker and Library Options Grouped by Language

C Linker and Library Options

Option Meaning
-B Specifies whether a library binding for linking is symbolic, dynamic (shared), or static (nonshared).
-d Allows or disallows dynamic libraries for the entire executable.
-G Build a dynamic shared library instead of an executable file.
-h Assign a name to the generated shared dynamic library.
-i Tells the linker, ld(1), to ignore any LD_LIBRARY_PATH setting.
-L Adds a path to the library search paths.
-l Adds dynamic or static library to linker's list of search libraries.
-mc Removes duplicate strings from the .comment section of the object file.
-mr Removes all strings from the .comment section of the object file and, if a substitute string is supplied, places the substitute in that section.
-mt Indicates compilation and linking for multithreaded code.
-Q Emits identification information to the output file.
-R Builds dynamic library search paths into the executable file.
-xbuiltin Enables or disables better optimization of standard library calls.
-xcode Specifies code address space.
-xldscope Changes the default linker scoping for the definition of extern symbols.
-xlibmieee Causes libm to return IEEE 754 values for math routines in exceptional cases.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xnativeconnect Includes interface information inside object file and subsequent shared libraries so that the shared library can interface with Java.
-xnolib Disables linking with default system libraries.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.
-xstrconst Inserts string literals into the read-only data section of the text segment instead of the default data segment.

C++ Linker and Library Options

Option Meaning
-B Specifies whether a library binding for linking is symbolic, dynamic (shared), or static (nonshared).
-d Allows or disallows dynamic libraries for the entire executable.
-G Build a dynamic shared library instead of an executable file.
-h Assign a name to the generated shared dynamic library.
-i Tells the linker, ld(1), to ignore any LD_LIBRARY_PATH setting.
-L Adds a path to the library search paths.
-l Adds dynamic or static library to linker's list of search libraries.
-library Incorporates specified compiler-provided libraries into compilation and linking.
-mc Removes duplicate strings from the .comment section of the object file.
-mr Removes all strings from the .comment section of the object file and, if a substitute string is supplied, places the substitute in that section.
-mt Indicates compilation and linking for multithreaded code.
-norunpath Does not build the path for shared libraries into the executable.
-Q Passes compiler options to a specific phase of the compilation process.
-R Builds dynamic library search paths into the executable file.
-staticlib Indicates which C++ libraries specified by the -library option (including its defaults), by the -xlang option, and by the -xia option are to be linked statically.
-xar Creates archive libraries.
-xbuiltin Enables or disables better optimization of standard library calls.
-xcode Specifies code address space.
-xlang Includes the appropriate runtime libraries and ensures the proper runtime environment for the specified language.
-xldscope Changes the default linker scoping for the definition of extern symbols.
-xlibmieee Causes libm to return IEEE 754 values for math routines in exceptional cases.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xnativeconnect Includes interface information inside object file and subsequent shared libraries so that the shared library can interface with Java.
-xnolib Disables linking with default system libraries.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.

F95 Linker and Library Options

Option Meaning
-B Specifies whether a library binding for linking is symbolic, dynamic (shared), or static (nonshared).
-d Allows or disallows dynamic libraries for the entire executable.
-G Build a dynamic shared library instead of an executable file.
-h Assign a name to the generated shared dynamic library.
-L Adds a path to the library search paths.
-l Adds dynamic or static library to linker's list of search libraries.
-mt Indicates compilation and linking for multithreaded code.
-norunpath Does not build the path for shared libraries into the executable.
-Q Passes compiler options to a specific phase of the compilation process.
-R Builds dynamic library search paths into the executable file.
-xcode Specifies code address space.
-xia Links the appropriate interval arithmetic libraries and sets a suitable floating-point environment.
-xlang Includes the appropriate runtime libraries and ensures the proper runtime environment for the specified language.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xnolib Disables linking with default system libraries.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.
-ztext Make no library with relocations.

ContactAbout SunNewsEmploymentSite MapPrivacyTerms of UseTrademarksCopyright Sun Microsystems, Inc.