libs

Tells the compiler which type of run-time library to link to.

IDE Equivalent

Windows: Libraries > Runtime Library
Linux: None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: None
Windows:  /libs[:keyword]

Arguments

keyword     Specifies the type of run-time library to link to. Possible values are:
  static Specifies a single-threaded, static library (same as specifying /libs).
  dll Specifies a single-threaded, dynamic-link (DLL) library.
  qwin Specifies the Fortran QuickWin library.
  qwins Specifies the Fortran Standard Graphics library.

Default

/libs:static or /libs The compiler links to a  single-threaded, static run-time library.  

Description

This option tells the compiler which type of run-time library to link to.

The library can be statically or dynamically loaded, multithreaded (/threads) or single-threaded, or debug (/dbglibs) or nondebug.

If you use the /libs:dll option and an unresolved reference is found in the DLL, it gets resolved when the program is executed, during program loading, reducing executable program size.

If you use the /libs:qwin or /libs:qwins option with the /dll option, the compiler issues a warning.

You cannot use the /libs:qwin option and options /libs:dll /threads.

The following table shows which options to specify for different run-time libraries:

Type of Library

Options Required

Alternate Option

Single-threaded, static /libs:static or /libs or /static /ML
Multithreaded /libs:static
/threads
/MT
Debug single-threaded /libs:static
/dbglibs
/MLd
Debug multithreaded /libs:static
/threads
/dbglibs
/MTd
Single-threaded, dynamic-link libraries (DLLs) /libs:dll /MDs

Debug single-threaded, dynamic-link libraries (DLLs)

/libs:dll
/dbglibs

/MDsd

Multithreaded DLLs

/libs:dll
/threads

/MD

Multithreaded debug DLLs /libs:dll
/threads
/dbglibs
/MDd
Fortran QuickWin multi-doc applications /libs:qwin /MW
Fortran standard graphics (QuickWin single-doc) applications /libs:qwins /MWs
Debug Fortran QuickWin multi-doc applications /libs:qwin
/dbglibs
None
Debug Fortran standard graphics (QuickWin single-doc) applications /libs:qwins
/dbglibs
None

Alternate Options

/libs:dll Linux:None
Windows: /MDs

/libs:static

Linux: None
Windows: /ML

/libs:qwin

Linux: None
Windows: /MW

/libs:qwins 

Linux: None
Windows: /MWs

See Also

Building Applications:
Programming with Mixed Languages Overview