Skip to content

Fb Main

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Intrinsic Defines › FB_MAIN

FB_MAIN

Intrinsic define set by the compiler

Syntax

__FB_MAIN__

Description

__FB_MAIN__ is defined in the main module and not defined in other modules.

The main module is determined by the compiler as either the first source file listed on the command line or explicitly named using the -m option on the command line.

Remarks

Differences from QB

  • New to FreeBASIC

See also

Examples

#ifdef __FB_MAIN__

  #print Compiling the main module

#else

  #print Compiling an additional module

#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