Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

libs

Tells the compiler which type of runtime library to link to.

Syntax

Linux:

None

Windows:

/libs[:keyword]

Arguments

keyword

Specifies the type of runtime library to link to. Possible values are:

dll

Specifies a multithreaded, dynamic-link (DLL) library.

qwin

Specifies the Fortran QuickWin library.

qwins

Specifies the Fortran Standard Graphics library.

static

Specifies a multi-threaded, static runtime library. This is the same as specifying /libs with no keyword.

Note that some libraries do not have a static version, such as the OpenMP runtime libraries or the coarray runtime libraries.

Default

/libs

The compiler links to a multi-threaded, static runtime library.

Description

This option tells the compiler which type of runtime library to link to.

This option is processed by the compiler, which adds directives to the compiled object file that are processed by the linker.

There are several types of libraries you can link to, depending on which compiler options you specify, as shown in the table below.

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 runtime libraries:

Type of Library

Options Required

Alternate Option

Multithreaded static

/libs (or /threads)

/MT

Debug multithreaded static

/libs (or /threads)

and /dbglibs

/MTd

Multithreaded DLLs

/libs:dll

/MD

Multithreaded debug DLLs

/libs:dll and

/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

NOTE:

This option adds directives to the compiled code, which the linker then reads without further input from the driver.

NOTE:

Starting with the 13.0 release of the Intel compilers, the Intel® OpenMP* library is provided in DLL form only.

IDE Equivalent

Visual Studio: Libraries > Runtime Library (/libs:{dll|qwin|qwins}, /threads, /dbglibs)

Alternate Options

/libs

Linux: -threads

Windows: /threads

/libs:dll

Linux: None

Windows: /MD

/libs:qwin

Linux: None

Windows: /MW

/libs:qwins

Linux: None

Windows: /MWs

See Also