# Linking or Linker Options

This section contains descriptions for compiler options that pertain to linking or to the linker. They are listed in alphabetical order.

Parent topic: Compiler Options

- 4Nportlib, 4Yportlib
  Determines whether the compiler links to the library of portability routines.
- Bdynamic
  Enables dynamic linking of libraries at run time.
- Bstatic
  Enables static linking of a user's library.
- Bsymbolic
  Binds references to all global symbols in a program to the definitions within a user's shared library.
- Bsymbolic-functions
  Binds references to all global function symbols in a program to the definitions within a user's shared library.
- cxxlib
  Determines whether the compiler links using the C++ run-time libraries provided by gcc.
- dbglibs
  Tells the linker to search for unresolved references in a debug run-time library.
- dll
  Specifies that a program should be linked as a dynamic-link (DLL) library.
- dynamic-linker
  Specifies a dynamic linker other than the default.
- dynamiclib
  Invokes the libtool command to generate dynamic libraries. This feature is only available for ifort.
- extlnk
  Specifies file extensions to be passed directly to the linker.
- F (Windows*)
  Specifies the stack reserve amount for the program.
- F (macOS)
  Adds a framework directory to the head of an include file search path. This feature is only available for ifort.
- fuse-ld
  Tells the compiler to use a different linker instead of the default linker (ld).
- l
  Tells the linker to search for a specified library when linking.
- L
  Tells the linker to search for libraries in a specified directory before searching the standard directories.
- libs
  Tells the compiler which type of run-time library to link to.
- link
  Passes user-specified options directly to the linker at compile time.
- map
  Tells the linker to generate a link map file.
- MD
  Tells the linker to search for unresolved references in a multithreaded, dynamic-link run-time library.
- MDs
  Tells the linker to search for unresolved references in a single-threaded, dynamic-link run-time library. This is a deprecated option. There is no replacement option.
- MT
  Tells the linker to search for unresolved references in a multithreaded, static run-time library.
- nodefaultlibs
  Prevents the compiler from using standard libraries when linking.
- nofor-main
  Specifies that the main program is not written in Fortran.
- no-intel-lib, Qno-intel-lib
  Disables linking to specified Intel® libraries, or to all Intel® libraries.
- nostartfiles
  Prevents the compiler from using standard startup files when linking.
- nostdlib
  Prevents the compiler from using standard libraries and startup files when linking.
- pie
  Determines whether the compiler generates position-independent code that will be linked into an executable.
- pthread
  Tells the compiler to use pthreads library for multithreading support.
- shared
  Tells the compiler to produce a dynamic shared object instead of an executable.
- shared-intel
  Causes Intel-provided libraries to be linked in dynamically.
- shared-libgcc
  Links the GNU libgcc library dynamically.
- static
  Prevents linking with shared libraries.
- static-intel
  Causes Intel-provided libraries to be linked in statically.
- static-libgcc
  Links the GNU libgcc library statically.
- static-libstdc++
  Links the GNU libstdc++ library statically.
- staticlib
  Invokes the libtool command to generate static libraries. This feature is only available for ifort.
- T
  Tells the linker to read link commands from a file.
- threads
  Tells the linker to search for unresolved references in a multithreaded run-time library.
- v
  Specifies that driver tool commands should be displayed and executed.
- Wa
  Passes options to the assembler for processing.
- winapp
  Tells the compiler to create a graphics or Fortran Windows application and link against the most commonly used libraries.
- Wl
  Passes options to the linker for processing.
- Wp
  Passes options to the preprocessor.
- Xlinker
  Passes a linker option directly to the linker.