Skip to content

Compiler Option Include

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

Home › Compiler Option: -include

Compiler Option: -include

Include a header file on each source compiled

Syntax

-include < include file >

Parameters

include file

The header file name with extension, and optionally a path, to include.

Description

The -include option has the effect of adding an #include preprocessor directive to the very beginning of each source file before processing it. When used multiple times, the files will be included in the order they are listed on the command-line.

To include the file header.bi when processing file1.bas and file2.bas, type,

fbc -include header.bi file1.bas file2.bas

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