FreeBASIC  1.09.0
About: FreeBasic is a set of cross-platform development tools consisting of a compiler, GNU-based assembler, linker and archiver, and supporting runtime libraries, including a software-based graphics library.
  Fossies Dox: FreeBASIC-1.09.0-source.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

FreeBASIC Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies FreeBASIC-1.09.0-source.tar.xz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).

    FreeBASIC - A multi-platform BASIC Compiler
    Copyright (C) 2004-2021 The FreeBASIC development team.

    Official site:
    Online manual:
    fbc project page:
    GitHub mirror:
    IRC channel:        ##freebasic at

    FreeBASIC consists of fbc (the command line compiler), the runtime libraries
    (libfb and libfbgfx), and FreeBASIC header files for third-party libraries.
    In order to produce executables, fbc uses the GNU binutils (assembler,
    linker). When compiling for architectures other than 32bit x86, fbc depends
    on gcc to generate assembly.

    Documentation of language features, compiler options and many other details
    is available in the FB manual. For help & support, visit the FB forum!

  o Installation & Usage

    FreeBASIC gives you the FreeBASIC compiler program (fbc or fbc.exe),
    plus the tools and libraries used by it. fbc is a command line program
    that takes FreeBASIC source code files (*.bas) and compiles them into
    executables.  In the combined standalone packages for windows, the main
    executable is named fbc32.exe (for 32-bit) and fbc64.exe (for 64-bit)

    fbc is typically invoked by Integrated Development Environments (IDEs) or
    text editors, from a terminal or command prompt, or through build-systems
    such as makefiles. fbc itself is not a graphical code editor or IDE!

    Win32 (similar for Win64):
      Separate 32-bit and 64-bit standalone packages:
        Download and extract latest:
           - or FreeBASIC-x.xx.x-win32.7z for 32-bit
           - or FreeBASIC-x.xx.x-win64.7z for 64-bit
      Combined 32-bit and 64-bit standalone packages:
        Download and extract latest:
           - FreeBASIC-x.xx.x-winlibs-gcc- or
           - FreeBASIC-x.xx.x-gcc-
           - fbc32.exe and fbc64.exe are used instead of fbc.exe

      Now you can use fbc.exe from the installation directory to compile FB
      programs (*.bas files) into executables (*.exe files). Open a command
      prompt (cmd.exe) and run fbc.exe from there, for example:
        1. In the opened command prompt, type in the following command and
           press ENTER:
             > fbc.exe examples\hello.bas
        2. This should have created examples\hello.exe in the FreeBASIC
           installation directory. You can run it by entering:
             > examples\hello.exe

      A FreeBASIC-x.xx.x-win32.exe installer is also available but should
      only be installed on win32 platforms.
        1. Click Start -> FreeBASIC -> Open console (installer only)
        2. In the opened command prompt, type in the following command and
           press ENTER:
             > fbc.exe examples\hello.bas
        3. This should have created examples\hello.exe in the FreeBASIC
           installation directory. You can run it by entering:
             > examples\hello.exe

      Optionally, you can install a text editor or IDE which will invoke fbc.exe
      for you, for example:

    Linux (if FreeBASIC is not available through your package manager):
      Download and extract the latest FreeBASIC-x.xx.x-linux.tar.gz. Open a
      terminal and cd into the extracted FreeBASIC-x.xx.x-linux directory, and
      run "sudo ./ -i" to copy the FB setup into /usr/local.
      To compile FB programs, please install the following packages (names may
      vary depending on your Linux distribution):
          gcc libncurses5-dev libffi-dev libgl1-mesa-dev
          libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev
          libtinfo5 libgpm-dev
          gcc ncurses-devel ncurses-compat-libs libffi-devel mesa-libGL-devel
          libX11-devel libXext-devel libXrender-devel libXrandr-devel
      If you want to use the 32bit version of FB on a 64bit system, it is
      necessary to have the gcc 32bit multilib support and 32bit versions
      of the libraries installed.
          gcc-multilib lib32ncurses5-dev libx11-dev:i386 libxext-dev:i386
          libxrender-dev:i386 libxrandr-dev:i386 libxpm-dev:i386 libtinfo5:i386

      Now you can use fbc to compile FB programs (*.bas files) into executables.
      For example:
        $ cd FreeBASIC-x.xx.x-linux/examples
        $ fbc hello.bas
      This should have created the hello program. You can run it by entering:
        $ ./hello

      Optionally, you can install a text editor or IDE which will invoke fbc for
      your, for example:
        Geany: (sudo apt-get install geany)

      Download and extract the latest

      Now you can use fbc.exe from the installation directory to compile FB
      programs (*.bas files) into executables (*.exe files). For example:
        > fbc.exe examples\hello.bas
      This should have created examples\hello.exe. You can run it by entering:
        > examples\hello.exe

  o Licensing

    The FreeBASIC compiler (fbc) is licensed under the GNU GPLv2 or later.

    The FreeBASIC runtime library (libfb and the thread-safe version, libfbmt)
    and the FreeBASIC graphics library (libfbgfx and the thread-safe version,
    libfbgfxmt) are licensed under the GNU LGPLv2 or later, with this exception
    to allow linking to it statically:
        As a special exception, the copyright holders of this library give
        you permission to link this library with independent modules to
        produce an executable, regardless of the license terms of these
        independent modules, and to copy and distribute the resulting
        executable under terms of your choice, provided that you also meet,
        for each linked independent module, the terms and conditions of the
        license of that module. An independent module is a module which is
        not derived from or based on this library. If you modify this library,
        you may extend this exception to your version of the library, but
        you are not obligated to do so. If you do not wish to do so, delete
        this exception statement from your version.

    The FreeBASIC documentation is licensed under the GNU FDL.

    Dependencies on third-party libraries:

    The FreeBASIC runtime library uses LibFFI to implement the Threadcall
    functionality. This means that, by default, FreeBASIC programs will be
    linked against LibFFI when using Threadcall. LibFFI is released under
    the MIT/Expat license, see doc/libffi-license.txt.

    By default, FreeBASIC programs are linked against various system and/or
    support libraries, depending on the platform. Those include the DJGPP
    libraries used by FreeBASIC for DOS and the MinGW/GCC libraries used by
    FreeBASIC for Windows.

  o Included/used third-party tools and libraries:

    - DJGPP
    - GCC 
    - GNU binutils
    - GNU debugger
    - GoRC
    - LibFFI
    - MinGW
    - MinGW-w64
    - OpenXDK
    - TDM-GCC
    - WinLibs

  o Credits

    Project members:
    - Andre Victor T. Vicentini (av1ctor[at]
        Founder, main compiler developer, author of many parts of the runtime,
        lead developer 2004 to 2010
        FB headers (FBSWIG) & emscripten port
        too many additions and improvements to list
    - Angelo Mottola (a.mottola[at]
        Author of the FB graphics library, built-in threads, thread-safe
        runtime, ports I/O, dynamic library loading, Linux port.
    - Bryan Stoeberl (b_stoeberl[at]
        SSE/SSE2 floating point math, AST vectorization.
    - Daniel C. Klauer (daniel.c.klauer[at]
        lead developer 2010 to 2017
        automatic header / bindings generation (fbfrog)
        FB releases 0.21 to 1.05.0, C & LLVM backends, 64bit port,
        dynamic arrays in UDTs, virtual methods, preprocessor-only mode,
        many fixes and compiler, rtlib & gfxlib2
        too many additions and improvements to list
    - Daniel R. Verkamp (i_am_drv[at]
        DOS, XBox, Darwin, *BSD ports, DLL and static library automation,
        VB-compatible runtime functions, compiler optimizations,
        miscellaneous fixes and improvements.
    - Ebben Feagan (sir_mud[at]
        FB headers, C emitter
    - Jeff Marshall (coder[at]
        FB releases 0.17 to 0.20, and later 1.06.0 and up
        FB documentation (wiki maintenance, fbdocs offline-docs generator),
        Gosub/Return, profiling support, dialect specifics, DOS serial driver,
        miscellaneous fixes and compiler, rtlib & gfxlib2
        lead developer since 2017
    - Mark Junker (mjscod[at]
        Author of huge parts of the runtime (printing support, date/time
        functions, SCR/LPTx/COM/console/keyboard I/O), Cygwin port,
        first FB installer scripts.
    - Matthew Fearnley (matthew.w.fearnley[at]
        Print Using & Co, ImageInfo, and others, dialect specifics,
        optimization improvements in the compiler, many fixes and improvements.
        rtlib & gfxlib2 fixes and improvements
        documentation and examples
        forum administrator and moderator since forever
    - Ruben Rodriguez (rubentbstk[at]
        Var keyword, const specifier, placement new, operator overloading and
        other OOP-related work, C BFD wrapper, many fixes and improvements.
    - Simon Nash
        AndAlso/OrElse operators, ellipsis for array initializers,
        miscellaneous fixes and improvements.

    - 1000101
        gfxlib2 patches, e.g. image buffer alignment
    - Abdullah Ali (voodooattack[at]
        Windows NT DDK headers & examples
    - adeyblue
        Direct2D windows driver
        run time and gfx library improvements and fixes
    - AGS
        gdbm, zlib, Mini-XML, PCRE headers
    - Angelo Rosina (angros47[at]
        gfxlib2 extensions for OpenGL 2D rendering
        integration of threading and dynamic libraries for DOS port (by monochromator)
        integration of emscripten branch and improvements
    - Claudio Tinivella (tinycla[at]
        Gtk tutorials
    - Chris Davies (c.g.davies[at]
        OpenAL headers & examples
    - Dinosaur
        CGUI headers
    - D.J.Peters
        ARM port, ODE headers & examples, Win32 API header fixes
    - Dumbledore
        wx-c headers & examples
    - dr0p (dr0p[at]
        PostgreSQL headers & examples
    - Edmond Leung (leung.edmond[at]
        SDL headers & examples
    - Eric Lope (vic_viperph[at]
        OpenGL & GLU headers & examples, examples/gfx/rel-*.bas demos
    - Florent Heyworth (florent.heyworth[at]
        Win32 API sql/obdc headers
    - fsw (fsw.fb[at]
        Win32 API headers, Gtk/Glade/wx-c examples
    - fxm
        documentation writer and manager for many years
        detailed technical articles, bug tracking and investigations
        documentation forum moderator
    - Garvan O'Keeffe (sisophon2001[at]
        FB ports of many NeHe OpenGL lessons, PDFlib examples
    - Hans L. Nemeschkal (Hans.Leo.Nemeschkal[at]
        DISLIN headers
    - Jofers (spam[at]
        ThreadCall keyword, libffi/libjit headers, FreeType examples
    - Jose Manuel Postigo (postigo[at]
        Linux serial devices support
    - Laanan Fisher (laananfisher[at]
        FB test suite using CUnit
    - Laurent Gras / SARG (debug[at]
        gas64 backend emitter
        improvements and fixes for stabs debugging
        fbdebugger project
    - Luther Ramsey (luther.ramsey[at] forums moderator
    - Matthew Riley (pestery)
        OpenGL, GLFW, glext, FreeGLUT, cryptlib headers
    - Matthias Faust (matthias_faust[at]
        SDL_ttf headers & examples
    - Marzec
        SDL headers, SDL_bassgl, SDL_opengl and SDL_key examples
        First file routines for FB's rtlib
    - MJK
        big_int header fixes
    - MOD
        wx-c, BASS headers; -lang qb support for built-in macros,
        "real" Rnd() algorithm
    - Nek (dave[at]
        Win32 API headers
    - Hung Nguyen Gia (gh_origin[at]
        Solaris and DragonFly porting and testing
    - Paul Squires (support[at]
        WinFBE IDE project and fbc compiler distribution bundle
    - Plasma
        FMOD and BASS headers & examples
    - Ralph Versteegen
        fixes / improvements to compiler, rtlib, gfxlib2, tests and headers
    - Randy Keeling (randy[at]
        GSL matrix example
    - Saga Musix (Jojo)
        BASS examples with sounds
    - Sisophon2001
        gfxlib2 fixes, Nehe OpenGL lesson ports
    - Stefan Wurzinger (swurzinger[at]
        compiler, runtime library and documentation generator improvements
        daily development builds, documentation builds and testing
        header/bindings updates
    - Sterling Christensen (sterling[at]
        Ex-project-member, author of FB's initial QB-like graphics library
    - TJF (Thomas.Freiherr[at]
        ARM port, GTK+, glib, Cairo, Pango headers & examples,
        SQLiteExtensions headers
    - zydon
        Win32 API examples

    - Plasma
        Owner of the domain and main site hoster, many thanks to
    - VonGodric
        Author of the first FreeBASIC IDE: FBIDE.
    - Everybody that helped writing the documentation (and in special Nexinarus 
      who started it)
    - All users that reported bugs, requested features and as such helped 
      improving the compiler, language and run-time libraries.