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

threads

Tells the linker to search for unresolved references in a multithreaded runtime library.

Syntax

Linux:

-threads

-nothreads

Windows:

/threads

/nothreads

Arguments

None

Default

threads

The linker searches for unresolved references in a library that supports enabling thread-safe operation.

Description

This option tells the linker to search for unresolved references in a multithreaded runtime library.

This option sets option reentrancy threaded.

Windows systems: The following table shows which options to specify for a multithreaded runtime library.

Type of Library

Options Required

Alternate Option

Multithreaded

/libs:static

/threads

/MT

Debug multithreaded

/libs:static

/threads

/dbglibs

/MTd

Multithreaded DLLs

/libs:dll

/threads

/MD

Multithreaded debug DLLs

/libs:dll

/threads

/dbglibs

/MDd

To ensure that a threadsafe and/or reentrant runtime library is linked and correctly initialized, option threads should also be used for the link step and for the compilation of the main routine.

NOTE:

On Windows* systems, this option is processed by the compiler, which adds directives to the compiled object file that are processed by the linker. On Linux* systems, this option is processed by the ifort command that initiates linking, adding library names explicitly to the link command.

IDE Equivalent

None

Alternate Options

None

See Also