Recent Changes - Search:

Home Page


Linux (via apt / rpm )
Linux wxWidgets
Release Notes


Build CodeLite

Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin



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

  • wxWidgets 3.1 or later
  • The gtk development package: for GTK+2 it's often called libgtk2.0-dev or wxGTK-devel or similar; for GTK3, libgtk-3-dev or wxGTK3-devel)
  • 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:

sudo apt-get install libgtk-3-dev \
                     pkg-config \
                     build-essential \
                     git \
                     cmake \
                     libsqlite3-dev \
                     libssh-dev \
                     libedit-dev \
                     libhunspell-dev \
                     clang-format-8 \

Building wxWidgets

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

Using GTK2 (less-commonly used nowadays)

cd /home/<USERNAME>/devl
git clone
cd /home/<USERNAME>/devl/wxWidgets
git submodule init
git submodule update
mkdir build-release
cd build-release
../configure --disable-debug_flag
make -j$(nproc) && sudo make install

Using GTK3 (recommended)

To build wxWidgets (with GTK3 support):

cd /home/<USERNAME>/devl
git clone
cd /home/<USERNAME>/devl/wxWidgets
git submodule init
git submodule update
mkdir build-release-gtk3
cd build-release-gtk3
../configure --disable-debug_flag --with-gtk=3
make -j$(nproc) && sudo make install

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 -j$(nproc)
 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>/devel/CLbuild/

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

 cd codelite
 mkdir build-debug
 cd build-debug
 cmake -G "Unix Makefiles" -DCOPY_WX_LIBS=1 -DCMAKE_BUILD_TYPE=Debug -DCL_PREFIX=/home/<USERNAME>/devel/CLbuild ..
 make -j$(nproc)
 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 -DCL_PREFIX=/home/<USERNAME>/devel/CLbuild installs CodeLite into the dir /home/<USERNAME>/devel/CLbuild/bin/codelite and the plugins will go into /home/<USERNAME>/devel/CLbuild/lib/codelite

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

~> home/<USERNAME>/devel/CLbuild/bin/codelite

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
-DCL_PREFIX="<some-prefix>" -DCL_PREFIX=/home/<USERNAME>/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 October 04, 2020, at 06:39 PM