Skip to content

Compiler Option Mt

Paul Squires edited this page Oct 14, 2026 · 3 revisions

Home › Compiler Option: -mt

Compiler Option: -mt

Link with thread-safe runtime library

Syntax

-mt

Description

The -mt compiler option forces linking with thread-safe runtime library for multithreaded applications. The thread-safe version is always used automatically if the FreeBASIC built-in threading functions are used, so you only need to specify this option if using your own threading routines.

The intrinsic macro __FB_MT__ is set to non-zero (-1) if the -mt option was specified, or whether one of the Threadtcreate or ThreadCall keywords is used more above in the source code. Otherwise, it is set to zero (0).

See also


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally