jump to navigation

Code::Blocks, a good C/C++ IDE for Linux October 2, 2008

Posted by razasayed in programming.
Tags: ,

Just some time back my brother who was using a Linux machine, asked me how he could do C/C++ development on that platform . Most colleges here in Mumbai teach students how to use the Borlands Turbo C++ IDE, a.k.a TC which i think by now is pretty outdated and can well be classified as an antique piece of software . Also, its a Windows only program , and when it comes to C/C++ programming on “Windows” most students never look beyond “toy” programs like prime numbers, factorial, matrix operations etc and use Microsoft Visual Studio for doing GUI stuff.

I think Linux is a good platform for budding C/C++ developers to hack on , where C/C++ are still the main “programming” languages used by developers , in addition to “scripting” languages like Python , PHP etc..

While there are numerous alternatives for C/C++ programming on Linux as far as IDE’s are concerned , for example, Eclipse , Anjuta , KDevelop etc, Code::Blocks according to me appears to be a really easy to use and lightweight IDE . Also just like Eclipse, Code::Blocks is also plugin based, and supports a lot of cool features we expect out of IDE’s like integrated debugger ,syntax highlighting, code completion , class browsers etc..

To install Code::Blocks on my bros machine running Ubuntu i performed the following procedure :

Step 1) Code:Blocks requires the wxWidgets , a cross-platform C++ GUI toolkit to be installed, so first install that by issuing the following command at the terminal :

sudo apt-get install libwxgtk2.8-0

Step 2) Download the Code::Blocks binary for Ubuntu from http://www.codeblocks.org/downloads/binaries

Step 3) Unzip the archive. Now , you will get a set of deb files.

Step 4) Finally, run the following command to install :

sudo dpkg -i *.deb

Thats it . You should now see the icon for Code::Blocks in your Programming Menu.

Note : I was facing some issues while trying to build gtk+ programs in Code::Blocks v8.02 , inspite of having the libgtk1.2-dev package installed .  However, the problems were resolved once i installed the libgtk2.0-dev package .

Happy Hacking ! 🙂