Skip to content
Paul Squires edited this page Oct 14, 2026 · 2 revisions

Home › Intrinsic Defines › FB_MT

FB_MT

Intrinsic define (macro value) set by the compiler

Syntax

__FB_MT__

Description

__FB_MT__ indicates if the the multithreaded option -mt was specified on the command line at the time of compilation, or whether one of the Threadtcreate or ThreadCall keywords is used more above in the source code.

Returns non-zero (-1) if the option was specified. Returns zero (0) otherwise.

Remarks

Differences from QB

  • New to FreeBASIC

See also

Examples

#if __FB_MT__

        #print Using multi-threaded library

#else

        #print Using Single-threaded library

#endif

Category: Intrinsic Defines
Kind: keyword


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