To build CodeLite on you computer you will need these packages:

  • wxWidgets 3.1 or later
  • The gtk development package: often called libgtk2.0-dev or wxGTK-devel or similar (if you choose to build with GTK3, install the proper development package)
  • pkg-config (which usually comes with the gtk dev package)
  • The build-essential package (or the relevant bit of it: g++, make etc)
  • git
  • cmake

Use the following command to install the prerequisites for Ubuntu 18.04/16.04:

sudo apt-get install     \
        libgtk2.0-dev    \
        pkg-config       \
        build-essential  \
        git              \
        cmake            \
        libsqlite3-dev   \
        libssh-dev       \
        libedit-dev      \
        libhunspell-dev  \
        libclang-6.0-dev \
        clang-format-6.0 \
        xterm            \

If your OS supports a higher or lower version of libClang/libLLDB - use them, as long they use the same version (e.g. libclang-3.6-dev liblldb-3.6-dev)

CodeLite now requires building against wxWidgets 3.1 built with GTK3 or GTK2

To build wxWidgets (with GTK2 support):

cd /home/eran/devl
git clone
cd /home/eran/devl/wxWidgets
git submodule init
git submodule update
mkdir build-release
cd build-release
../configure --disable-debug_flag
make -j8 && sudo make install

To build wxWidgets (with GTK3 support):

cd /home/eran/devl
git clone
cd /home/eran/devl/wxWidgets
git submodule init
git submodule update
mkdir build-release-gtk3
cd build-release-gtk3
../configure --disable-debug_flag --with-gtk=3
make -j8 && sudo make install

If your distro does not offer wxWidgets 3.1.X or later and you don't know how to build (or you're just lazy ...) you can download
and install a wxWidgets package from CodeLite's repository.

If apt-get asks you for advice, press Y and ENTER.

Getting the source code

When you have all required packages, you need to get codelite source code from git.

Run the following command in a terminal:

 git clone

This will create a directory codelite which will contain the latest version of the CodeLite source code

Building CodeLite

The following assumes that you have wxWidgets installed in /usr/lib or similar. If you have a 'local' install elsewhere that isn't in your $PATH, you will need to point to it: see the tip at the end of the Debug section below.


Compiling CodeLite in release mode is pretty straightforward.
Type the following commands from your terminal:

 cd codelite
 mkdir build-release
 cd build-release
 make -j4
 sudo make install

CMake does not provide a sudo make uninstall target, if you wish to uninstall a self compiled CodeLite, use this command:
sudo xargs rm < install_manifest.txt

(If you aren't on a sudo-using distro, use su for the 'make install' step.)

CodeLite will be installed into the following folders:

  • /usr/bin - all binaries (scripts + executables)
  • /usr/lib/codelite - codelite's plugins + shared libraries
  • /usr/share/codelite - configurations, images and other misc files required by codelite


To compile CodeLite in debug mode it is recommended to install it somewhere inside your $HOME directory,
for example, in /home/<USER>/root

Now you need to tell cmake to compile CodeLite and install it under /home/<USER>/root:

 cd codelite
 mkdir build-debug
 cd build-debug
 cmake -G "Unix Makefiles" -DCOPY_WX_LIBS=1 -DCMAKE_BUILD_TYPE=Debug -DPREFIX=/home/<USERNAME>/root ..
 make -j4
 make install

Note that you don't need to be superuser for the 'make install' step as you are installing under your home dir.
Note 2: the -DPREFIX=/home/<USERNAME>/root installs CodeLite into the folder /home/<USERNAME>/root/bin/codelite and the plugins will go into /home/<USERNAME>/root/lib/codelite

You can now run CodeLite by typing from the command line:


To compile CodeLite using a different wxWidgets build, run cmake similar to this:
PATH=/path/to/my/other/wx/build:$PATH cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
Note: of course, you can change the cmake arguments to fit your needs...

Other useful CMAKE arguments supported by CodeLite

cmake argument Example Mandatory? Comment
-DCMAKE_BUILD_TYPE=<Release|Debug|DebugFull> -DCMAKE_BUILD_TYPE=Release Yes Build configuration type for release|debug+optimisation|debug without optimisation
-DPREFIX="<some-prefix>" -DPREFIX=/home/eran/CL No Install codelite into a different directory. Default is set to /usr
-DENABLE_CLANG=1|0 -DENABLE_CLANG=1 No Build codelite with clang code completion support? Default is 1 (with clang)
-DMAKE_DEB=1|0 -DMAKE_DEB=1 No When set, a new make target is created by cmake, called package. Running make package thereafter will generate a .deb file for installation
-DWITH_PCH=1|0 -DWITH_PCH=1 No Support pre-compiled headers in the build
-DWITH_MYSQL=1|0 -DWITH_MYSQL=1 No Compiles Database Explorer plugin with MySQL support
-DGTK_USE_NATIVEBOOK=1|0 -DGTK_USE_NATIVEBOOK=0 No Under GTK, use the native book editor instead of the generic one. Default is set to 0
Edit - History - Print - Recent Changes - Search
Page last modified on August 05, 2018, at 04:03 PM