fbc − The FreeBASIC compiler
Compiles FreeBASIC source code files (*.bas) to native code.
fbc [options] input-files
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 |
−earray
Enable array bounds checking
−eassert
Enable assert() and assertwarn() checking
−edebug
Enable __FB_DEBUG__
−edebuginfo
Add debug information
−elocation
Enable full error location reporting
−enullptr
Enable null-pointer checking
−entry name
Change the entry point of the program from main()
−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, enable __FB_DEBUG__, and enable asserts |
−gen gas|gcc|llvm|as64
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, fblite
−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
−nostrip
Do not strip symbol information from the output file
−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-independent 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)
−print sha-1
Display compiler’s source code commit sha-1 (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
−strip |
Omit all symbol information from the output file |
−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
−w all |
Enable all warnings |
−w none
Disable all warnings
−w param
Enable parameter warnings
−w escape
Enable string escape sequence warnings
−w next
Enable next statement warnings
−w signedness
Enable type signedness warnings
−w constness
Enable const type warnings
−w suffix
Enable invalid suffix warnings
−w error
Report warnings as errors
−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
−z nocmdline
Disable #cmdline source directives
AS |
Overrides location of GNU as (assembler) |
|||
LD |
Overrides location of GNU ld (linker) |
|||
GCC |
Overrides location of gcc (-gen gcc) |
The full language specification and help is available in wiki format at https://www.freebasic.net/wiki/
Copyright
© 2004−2021 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.
Any bugs should be reported on the Sourceforge.net tracker located at http://www.sourceforge.net/projects/fbc
This manpage written by Ebben Feagan (ebben.feagan@gmail.com)