Syntax
-target <target>
Description
Selects the target platform used by the compiler.
The target controls the predefined platform symbols, default object format,
library search paths, runtime startup code, and platform-specific compiler
behavior.
Common target names include:
dos
win32
win64
linux
haiku
freebsd
dragonfly
netbsd
openbsd
darwin
solaris
illumos
android
js-asmjs
xbox
wii
Some targets may also be selected through a GNU-style target triplet such as
linux-x86_64,
linux-arm,
android-aarch64, or
freebsd-x86_64.
For some cross targets, helper commands may be installed alongside the
compiler. Those helpers are usually the best entry point:
fbc-js
fbc-android
fbc-wii
fbc-xbox
Those commands supply the SDK, linker, runtime, and packaging options expected
by their platform.
Example
fbc -target linux hello.bas
fbc -target haiku hello.bas
fbc -target android hello.bas
fbc -target js-asmjs hello.bas
fbc -target xbox hello.bas
fbc -target wii hello.bas
Predefined target symbols
The compiler defines
__FB_<TARGET>__ for the selected target. For example:
Portable programs should use these predefined symbols when platform-specific
code is required.
See also