Skip to content

Compiler Option File

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

Home › Compiler Option: @file

Compiler Option: @file

Read (additional) command-line options from the file

Syntax

@file

Parameters

file

Name of a text file containing command line options. It's possible to use multiple lines in the file. The options may be separated by spaces or line breaks, and support double-quoted strings to allow spaces in parameters (like the real command line). This file can itself contain additional @file options.

Description

The @file compiler option tells the compiler to parse the specified file to find more command line options. The options found in the file are treated as if they were found on the command line. This can be useful to pass very long command lines to the compiler, for example on DOS, where command lines are limited in length.

Example

options.txt:

-d TEST=123

opts.bas:
Print "TEST=" & TEST

Compile with:

fbc @options.txt opts.bas

Output:

TEST=123

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