To build CodeLite on you computer you will need these packages:
Use the following command to install the prerequisites for Ubuntu 14.04 / 14.10 / 15.04 / 15.10:
sudo apt-get install \ libwxgtk3.0-dev \ libgtk2.0-dev \ pkg-config \ build-essential \ git \ cmake \ libsqlite3-dev \ libssh-dev \ libedit-dev \ libhunspell-dev \ libclang-3.5-dev \ clang-format-3.5 \ xterm \ liblldb-3.5-dev
If your OS supports a higher version of libClang/libLLDB - use them, as long they use the same version (e.g. libclang-3.6-dev liblldb-3.6-dev)
Most modern and up to date Linux distros offer wxWidgets 3.0.X via their package manager which you can use for building CodeLite.
If your distro does not offer wxWidgets 3.0.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.
On Debian, use the following command to install the dependencies:
sudo apt-get install libgtk2.0-dev \ pkg-config \ build-essential \ git \ cmake \ libsqlite3-dev \ libssh-dev \ libedit-dev \ libhunspell-dev \ xterm \ libclang-dev
If apt-get asks you for advice, press Y and ENTER.
When you have all required packages, you need to get codelite source code from git.
Run the following command in a terminal:
git clone https://github.com/eranif/codelite.git
This will create a directory
codelite which will contain the latest version of the CodeLite source code
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 cmake -DCMAKE_BUILD_TYPE=Release .. -DCOPY_WX_LIBS=1 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:
To compile CodeLite in debug mode it is recommended to install it somewhere inside your $HOME directory,
for example, in
Now you need to tell cmake to compile CodeLite and install it under
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
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...
||Yes||Build configuration type for release|debug+optimisation|debug without optimisation|
||No||Install codelite into a different directory. Default is set to /usr|
||No||Build codelite with clang code completion support? Default is 1 (with clang)|
||No||When set, a new make target is created by cmake, called package. Running
||No||Support pre-compiled headers in the build|
||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|