How to install Codelite on Ubuntu 17.04

How to install Codelite on Ubuntu 17.04

Codelite is a free, open-source, cross-platform IDE for the C, C++, PHP and JavaScript programming languages using the wxWidgets toolkit. It features project management, code completion, code refactoring, source browsing and more. This tutorial explains the installation procedure of Codelite on Ubuntu.

Installation procedure

To start the installation procedure, add the repo by executing the following command.

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.
+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this a nd related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you.
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
  runtime licensing and possible legal consequences.
* Some packages provided with their dependencies while some might require additional
  Ubuntu repositories and external PPAs. Below is the list of
.
.
.
gpg: keybox ' /tmp/tmp45ukjtz6/pubring.gpg'  created
gpg: /tmp/tmp45ukjtz6/trustdb.gpg: trustdb created
gpg: key E61380B28313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:imported: 1
OK

The repositories are added in the target system. Now update the repo by executing the apt-get update command.

root@linuxhelp1:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Get:2 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty InRelease [15.4 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease [89.2 kB]
Get:5 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main i386 Packages [3,924 B]
Get:6 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main amd64 Packages [3,916 B]
Get:7 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main Translation-en [3,140 B]
Hit:8 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Fetched 205 kB in 3s (57.4 kB/s)
Reading package lists... Done

The target machine is updated with the required packages. Install the codelite package by running the following command and press y to continue with the installation.

root@linuxhelp1:~# apt-get install codelite -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libclang1-3.9 libllvm3.9 libssh-gcrypt-4 libwxbase3.0-0v5 libwxgtk3.0-0v5 libwxsqlite3-3.0-0 wx-common
Suggested packages:
codelite-plugins
The following NEW packages will be installed:
codelite libclang1-3.9 libllvm3.9 libssh-gcrypt-4 libwxbase3.0-0v5 libwxgtk3.0-0v5 libwxsqlite3-3.0-0 wx-common
0 upgraded, 8 newly installed, 0 to remove and 46 not upgraded.
Need to get 29.4 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu zesty/main amd64 libllvm3.9 amd64 1:3.9.1-5ubuntu1 [11.2 MB]
Get:2 http://in.archive.ubuntu.com/ubuntu zesty/main amd64 libclang1-3.9 amd64 1:3.9.1-5ubuntu1 [5,936 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu zesty/main amd64 libssh-gcrypt-4 amd64 0.7.3-2 [160 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libwxbase3.0-0v5 amd64 3.0.2+dfsg-4 [968 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libwxgtk3.0-0v5 amd64 3.0.2+dfsg-4 [4,347 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libwxsqlite3-3.0-0 amd64 3.4.1~dfsg-1 [58.8 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 codelite amd64 10.0+dfsg-1 [6,638 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 wx-common amd64 3.0.2+dfsg-4 [68.2 kB]
Fetched 29.4 MB in 4min 36s (106 kB/s)
Selecting previously unselected package libllvm3.9:amd64.
(Reading database ... 168833 files and directories currently installed.)
Preparing to unpack .../0-libllvm3.9_1%3a3.9.1-5ubuntu1_amd64.deb ...
Unpacking libllvm3.9:amd64 (1:3.9.1-5ubuntu1) ...
Selecting previously unselected package libclang1-3.9:amd64.
Preparing to unpack .../1-libclang1-3.9_1%3a3.9.1-5ubuntu1_amd64.deb ...
Unpacking libclang1-3.9:amd64 (1:3.9.1-5ubuntu1) ...
Selecting previously unselected package libssh-gcrypt-4:amd64.
Preparing to unpack .../2-libssh-gcrypt-4_0.7.3-2_amd64.deb ...
Unpacking libssh-gcrypt-4:amd64 (0.7.3-2) ...
Selecting previously unselected package libwxbase3.0-0v5:amd64.
Preparing to unpack .../3-libwxbase3.0-0v5_3.0.2+dfsg-4_amd64.deb ...
Unpacking libwxbase3.0-0v5:amd64 (3.0.2+dfsg-4) ...
.
.
.
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Setting up libclang1-3.9:amd64 (1:3.9.1-5ubuntu1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Setting up wx-common (3.0.2+dfsg-4) ...
Setting up libwxgtk3.0-0v5:amd64 (3.0.2+dfsg-4) ...
Setting up libwxsqlite3-3.0-0:amd64 (3.4.1~dfsg-1) ...
Setting up codelite (10.0+dfsg-1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...

To open the package, type the codelite package name in the Ubuntu dashboard and click on the icon for the application to run.

The application is running successfully and it can be used to compile any number of languages.

For removing the package, execute the remove command and press y to continue with the uninstallation process.

root@linuxhelp1:~# apt-get remove codelite -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libclang1-3.9 libllvm3.9 libssh-gcrypt-4 libwxbase3.0-0v5 libwxgtk3.0-0v5 libwxsqlite3-3.0-0 wx-common
Use ' apt autoremove'  to remove them.
The following packages will be REMOVED:
codelite
0 upgraded, 0 newly installed, 1 to remove and 46 not upgraded.
After this operation, 23.5 MB disk space will be freed.
(Reading database ... 169141 files and directories currently installed.)
Removing codelite (10.0+dfsg-1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...

Wasn' t that an easy installation procedure? The codelite contains a yacc parser that can be used by other IDEs.

FAQ
Q
How to add an existing file in Codelite?
A
First you need to have a project (see above). Go to the workspace tab, expand the workspace and the project. You will notice two virtual folders by default "Source files" and "Header files". Right click either of them and hit "add existing file" to add the file to that folder.
Q
How to create own makefile instead of codelite's generated one?
A
Yes. Open the project settings->customize->custom build' tick the checkbox, and provide the commands to run the Makefile.
Q
How can I restore CodeLite to its default layout setting?
A
From the main menu: Perspective->Restore Default Layout
Q
how to check version in Codelite?
A
For check the version of Codelite, use the following command as given below "# codelite -V"
Q
How to get code completion for GTKMM?
A
codelite code completion is searching for files in the same paths as your compiler. So in short, if your code compiles fine, you should get code completion