Skip to content
bluehazzard edited this page Jun 12, 2022 · 2 revisions

Installing Codeblocks from source on Ubuntu 22.04


WORK IN PROGRESS


This guide describes a step by step list to install codeblocks from source on a fresh ubuntu 22.04 installation.

We will use only the command line because it is the most usefull and versatile tool, plus it is easy to use. If you never worked with the command line tool, please read this. It will make your work a lot easier.

Setup build system

First we need a compiler and some other tools to build codeblocks.

  1. Open a terminal (iiiek terminal) window by clicking on the terminal symbol (at the bottom the black symbol with ">_" in it)
  2. type sudo apt install gcc build-essential subversion libtool autotools-dev automake debhelper cdbs . This will install compiler and build tools to compile codeblocks and build a package to install it.
  3. Enter your admin password if asked and confirm any question with Y (or hit enter)

Build codeblocks with system default wxWidgets

Codeblocks uses wxWidgets as window framework, so first step is to install wxWidgets

Installing wxWidgets

  1. Open a terminal
  2. type sudo apt install libwxgtk3.0-dev
  3. Again enter your password and confirm everything with yes

Install other needed libraries

We need additional libraries for many plugins:

  1. Open a terminal
  2. type sudo apt install libgtk-3-dev libhunspell-dev libgamin-dev libboost-dev libboost-system-dev libbz2-dev
  3. Again enter your password and confirm everything with yes

Building codeblocks with make and installing it

  1. Open a terminal
  2. Go to your home directory by typing cd ~ and hit enter
  3. Create a directory for codeblocks with mkdir codeblocks and go into this directory with cd codeblocks
  4. Download the latest source code with svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code and change the directory to it with cd codeblocks-code
  5. run ./bootstrap
  6. run ./configure --with-contrib-plugins=all
  7. run make
  8. run sudo make install
  9. run sudo ldconfig

You can run codeblocks now by running codeblocksin a command line window

Uninstall codeblocks after installing it with make

  1. in the folder you run sudo make installyou run now sudo make uninstall

Building codeblocks to package

  1. Open a terminal
  2. Go to your home directory by typing cd ~ and hit enter
  3. Create a directory for codeblocks with mkdir codeblocks and go into this directory with cd codeblocks
  4. Download the latest source code with svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code and change the directory to it with cd codeblocks-code
  5. run ./bootstrap
  6. create a debian package with dpkg-buildpackage -us -uc

Installing the package

Uninstalling codeblocks