How to install the Code::Blocks IDE?

I am using 64-bit Ubuntu and I want to install the Code::Blocks IDE. Is there any repository?


Solution 1:

It's available in the Software Center.

Just open the Ubuntu Software Center and search for its name.

Or install via the terminal:

sudo apt-get install codeblocks

Solution 2:

Note: damien-moore's PPA mentioned in this answer has Code::Blocks version 16.01 and does not support releases after 16.04.

From the Code::Blocks website, the download page for Linux points to the Code::Blocks Release Builds PPA, which is probably the easiest way to install a reasonably up-to-date version of Code::Blocks. To install Code::Blocks from the aforementioned PPA, do the following:

sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib

Solution 3:

Code::Blocks is a cross-platform Integrated Development Environment (IDE). It is based on a self-developed plugin framework allowing unlimited extensibility. Most of its functionality is already provided by plugins. Plugins included in the base package are:

  • Compiler frontend to many free compilers
  • Debugger frontend for GDB (and CDB for windows platforms)
  • Source formatter (based on AStyle)
  • Wizard to create new C++ classes
  • Code-completion / symbols-browser (work in progress)
  • Default MIME handler
  • Wizard to create new Code::Blocks plugins
  • To-do list
  • Extensible wizard based on scripts
  • Autosave (saves your work in the unfortunate case of a crash)1

To download and install click the image below.

Install via the software center

1Source:Ubuntu Apps Directory

Solution 4:

You can install CodeBlocks using following command:

sudo apt-get install codeblocks

Solution 5:

If you plan to develop on ubuntu its beneficial to learn how to compile code from the command line ... even the codeblocks IDE

download source code

http://www.codeblocks.org/downloads

pick file similar to codeblocks_16.01.tar.gz

cd into where you wish to expand the tarball and issue

tar xvf /path/to/codeblocks_16.01.tar.gz

cd codeblocks-16.01.release

autoreconf -fi  #  
./configure  #  standard check to confirm your have necessary libs
make -j4   # actual compile and link step
sudo make install  # install binary and its libs
sudo ldconfig  # this registers your new libs

now its installed ... go ahead and launch

codeblocks   #  Voila you have launched your new IDE

If above gives errors you probably have yet to install upstream dependancies ... if so this may help

sudo apt-get install build-essential 
sudo apt-get install -y libwxbase3.0-0v5 libwxbase3.0-dev libwxgtk3.0-dev wx3.0-headers wx-common
sudo apt-get build-dep codeblocks