Compilation & Installation

This document explains how to build and install Gambas from the source code.

While this is not the easiest way to install Gambas on your system (as most distributions provide Gambas packages), it is needed if you want the very last Gambas version, or if you want to work with the development version.


Development Packages

In order to compile Gambas, you must install the following dependencies and their "development" counterparts.

The actual name of the packages containing these dependencies may vary according to your distribution, so please refer to the distribution specific pages below for more details.


Requirements (libraries or pkg-config module)
Compilation gcc g++ automake autoconf libtool >= 2.0
Interpreter libffi
gb.cairo cairo >= 1.6.0 cairo-ft >= 1.6.0
gb.dbus dbus-1
gb.desktop.gnome gnome-keyring-1
gb.gtk gtk+-2.0 >= 2.16 cairo >= 1.6.0 cairo-ft >= 1.6.0 gtk+-unix-print-2.0 >= 2.10 librsvg-2.0 >= 2.14.3
gb.gtk.opengl gtkglext-1.0 gdk-pixbuf
gb.image.imlib imlib
gb.libxml libxml-2.0 gstreamer-0.10 >= 0.10.31 gstreamer-interfaces-0.10 >= 0.10.31 for Gambas <= 3.4

gstreamer-1.0 gstreamer-video-1.0 for Gambas >= 3.5

gb.mime gmime-2.4 or gmime-2.6
gb.ncurses libcurl >= 7.13
gb.openal openal >= 1.13 alure
gb.opengl gb.opengl.glsl
gb.openssl openssl
gb.pdf poppler >= 0.5
gb.poppler poppler >= 0.5 poppler-glib
gb.qt4 gb.qt4.ext gb.qt4.opengl gb.qt4.webkit All Qt4 libraries >= Qt 4.5
gb.qt5 Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5Svg Qt5PrintSupport Qt5X11Extras
gb.qt5.opengl Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5OpenGL

Note: Qt5OpenGL is not needed if your Qt version is >= 5.4.0

gb.qt5.webkit Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5Network Qt5Xml Qt5WebKit
Qt5WebKitWidgets Qt5PrintSupport
gb.sdl2 libSDL2_image-2.0 libSDL2_ttf-2.0
gb.v4l Video4Linux >= 2.0
gb.xml.xslt libxml-2.0 libxslt

Other requirements

You must have the right to write to the /tmp directory, otherwise Gambas will not work.

The following versions of GNU tools are also needed for building:

  • automake 1.11.1

  • autoconf 2.68

  • libtool 2.4

Compiling with older versions may or may not work!

Downloading the sources

There are two ways to get the Gambas sources : downloading the release tar archive, or fetching it from the git repository.

Downloading the release tar archive

The tar archive for the latest release can be directly downloaded from the website, in the Download section.

Downloading from git

Downloading the sources from git is needed if you want to use the development version. You will also need to install git in order to use the following commands. For more info about using Gitlab Gambas repository see in the Git development guide for Gambas

Enter the following command to retrieve the latest revision of the development version in a new gambas directory :

git clone --depth=1

The --depth=1 argument makes git only download the latest version. If you omit it, it will download the entire history of changes made in the source code, which is useless if you do not plan to contribute to Gambas.

Therefore, it is better for most users to leave this option on, as it will reduce the size of the download, as well as the disk usage.

Once complete, a gambas directory will be created containing the source code.

In order to check for and download updates, enter the gambas directory, and use the following command :

git pull

The sources will then be updated, and you will have to restart the compilation and installation procedure in order to apply the changes to your system.

How to compile and install Gambas 3

Source package configuration

The compilation procedure is the same whether you downloaded the sources from the tarball or from git.

When you are sure that everything is downloaded, type the following magic sentences in a shell.

'$' represents your shell prompt, and '...' are the messages printed during the configuration and compilation.

First, enter the source top-level directory.

$ cd /path/to/source/directory/

Then, type that to create the configuration scripts.

$ ./reconf-all

Then type that to analyze the current system and configure the package:

$ ./configure -C

If a library or a development package is missing, then you will be warned that some components are disabled.

There are more 'configure' specific explanations in the INSTALL file located in the top-level source directory. I invite you to read them.


If everything is configured without error, then run this command to compile the program:

$ make


If everything compiles without error, then enter this command to install everything:

You must be root to install Gambas on your system.

$ su -c "make install"
Password: <Type the root password here>


$ sudo make install
Password: <Type your password here>


If you did several successive compilations, after having updated the source from the repository for example, and if something fails during all this process, you can try to "reconfigure" the configuration scripts by typing the following command:

$ ./reconf-all

Then you can run ./configure -C again

If it does not work, I need to know what happened exactly. To do so, type the following command :

$ ( ./configure -C; make; make install ) > output.txt 2>&1

And send me the file "output.txt" by mail, with every other detail about your computer and your distribution you find useful.

Instructions for specific distributions

Arch Linux
Arch Linux Arm
Linux Mint
OpenSUSE 10.2

The Development Environment

The Gambas IDE is made with Gambas. In order to compile and use it, you need to compile the following components: