FBC(1)

NAME
fbc - The FreeBASIC compiler

DESCRIPTION
Compiles FreeBASIC source code files (*.bas) to native code.

SYNOPSIS
fbc [options] input-files

OPTIONS

input-files
    *.a = library, *.o = object, *.bas = source, *.rc = win32 resource script, *.res = win32 compiled resource, *.xpm = X11 icon resource

@file
    Read more command line arguments from a file

-a file
    Treat file as .o/.a input file

-arch type
    Set target architecture (default: 486)

-asm att|intel
    Set the assembler format for Asm blocks and for code generation (x86 only)

-b file
    Treat file as .bas input file

-c  Compile only, do not link

-C  Preserve temporary .o files

-d name[=val]
    Add a global #define

-dll
    Same as -dylib

-dylib
    Create a Win32 DLL or Linux/*BSD shared library

-e  Enable runtime error checking

-ex -e plus RESUME support

-exx
    -ex plus array bounds/null-pointer checking

-export
    Export symbols for dynamic linkage

-forcelang name
    Override #lang statements in source code

-fpmode fast|precise
    Select floating-point math accuracy/speed

-fpu x87|sse
    Set target FPU

-g  Add debug info

-gen gas|gcc|llvm
    Select code generation backend

-i path
    Add an include file search path

-include file
    Pre-#include a file for each input .bas

-l name
    Link in a library

-lang name
    Select FB dialect: fb (default), deprecated, qb

-lib
    Create a static library

-m name
    Set main module (default if not -c: first input .bas)

-map file
    Save linking map to file

-maxerr n
    Only show n errors

-mt Use thread-safe FB runtime

-nodeflibs
    Do not include the default libraries

-noerrline
    Do not show source context in error messages

-o file
    Set .o file name for corresponding input .bas

-O value
    Optimization level (default: 0)

-p path
    Add a library search path

-pic
    Generate position-indepedent code (non-x86 Unix shared libs)

-pp Write out preprocessed input file (.pp.bas) only

-prefix path
    Set the compiler prefix path

-print host|target
    Display host/target system name

-print x
    Display output binary/library file name (if known)

-profile
    Enable function profiling

-r  Write out .asm (-gen gas) or .c (-gen gcc) only

-rr Write out the final .asm only

-R  Preserve the temporary .asm/.c file

-RR Preserve the final .asm file

-s console|gui
    Select win32 subsystem

-static
    Prefer static libraries over dynamic ones when linking

-t value
    Set Win32/DOS .exe stack size in kbytes, default: 1024

-target name
    Set cross-compilation target

-title name
    Set XBE display title (XBox)

-v  Be verbose

-vec n
    Automatic vectorization level (default: 0)

-version
    Show compiler version

-w all|pedantic|n
    Set minimum warning level: all, pedantic, or an integer

-Wa a,b,c
    Pass options to GAS

-Wc a,b,c
    Pass options to GCC (with -gen gcc)

-Wl a,b,c
    Pass options to LD

-x file
    Set output executable/library file name

-z gosub-setjmp
    Use setjmp/longjmp to implement GOSUB

ENVIRONMENT

AS  Overrides location of GNU as (assembler)

LD  Overrides location of GNU ld (linker)

GCC Overrides location of gcc (-gen gcc)

SEE ALSO
The full language specification and help is available in wiki format at http://www.freebasic.net/wiki/

COPYRIGHT
Copyright © 2004-2013 The FreeBASIC Development Team
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.

BUGS
Any bugs should be reported on the Sourceforge.net tracker located at http://www.sourceforge.net/projects/fbc

AUTHOR
This manpage written by Ebben Feagan (ebben.feagan@gmail.com)