Skip navigation

Monthly Archives: March 2011

As I struggled several weeks to get KDevelop up and running for C++ / ROOT development because there are only few and mostly bad instructions I here present you with a short one. Hopefully it will help prevent the severe headaches I had. BEHOLD!!!

After having installed Ubuntu 10.10 (Maverick Meerkat) successfully (what shouldn’t be a problem as the installation procedure is smoother than ever before) the next step towards getting the development environment up and running is adding the right software sources for aptitude to find KDevelop. Nothing easier as that … open a terminal and execute

  • sudo add-apt-repository ppa:kubuntu-ppa/backports

  • sudo apt-get update

  • sudo apt-get install kdevelop


Now KDevelop 4.2 should be installed on the system. To use the KDevelop build system also install cmake by executing

  • sudo apt-get install cmake


To test if KDevelop is installed correctly enter

  • kdevelop


anywhere in the terminal.

The next step is to install ROOT.

Go to and download the latest version (a link “ROOT x.xx/xx complete source tree for all systems”). To be able to compile ROOT the following dependencies have to be fulfilled.

  1. make
  2. g++
  3. gcc
  4. binutils
  5. libx11-dev
  6. libxpm-dev
  7. libxft-dev
  8. libxext-dev


To install those, if not already installed, execute

  • sudo apt-get install (… followed by the expression after the numbers 1 to 8 )


Having provided all dependencies ROOT is ready to be built.

Enter the directory where ROOT was downloaded to and extract the archive by executing

  • tar -xvf (… followed by the name of the file)


After changing into the newly generate directory named ./root, execute

  • ./configure –prefix=/usr/local (do not cut and paste this)


followed by the command

  • make -j x (where x is the number of CPU cores of the system +1, for best performance)


to actually build it.

Wait … wait … wait even more until the process has finished. Now its ready to be installed by executing

  • sudo make install


The only thing which is left now is to tell the compiler where to find the new libraries. To do so create the file libroot.conf in /etc/ by entering

  • sudo nano /etc/


into the terminal and editing the content of the file to read

  • /usr/local/lib/root


Save it by pressing <strg>+o then <enter> and leave the editor by hitting <strg>+x.

Next step is to register libroot.conf by entering

  • sudo ldconfig


Now it should be possible to run ROOT. To test if everything is right to this point do

  • root


anywhere in the terminal. A pop up window should appear, indicating that ROOT is starting.

Leave it by entering

  • .q


and hitting <enter> .

Now KDevelop has to be configured.

For the correct parameters execute

  • root-config –cflags –glibs


and copy the results into the clipboard.

Open KDevelop again, create your project and compile it once to be able to access the advanced project configuration (else it won’t show up) .

Enter the project configuration by right clicking onto your project in the tree on the left side and hitting “Open Configuration”.

Now click “Show Advanced” and mark “Show Advanced Values”.

Scroll down to the entry which reads “CMAKE_CXX_FLAGS”, paste the values copied before into the field on the right and close the windows by clicking “OK”.

VOILA! KDevelop is ready to be used to create C++ / ROOT programmes.

To be able to debug the programme, launches have to be configured by clicking on “Run” and “Configure Launches”.

For “Project Target” choose your project.

It is also advised to configure “Dependencies” so that the programme is built upon debugging. Choose “Build” as the action and your project as the target. NOTHING else has to be done to enable debugging in KDevelop.




It happend! It seems that I am starting a blog … indicated by this first entry into my blog. As a matter of uncreativity I don’t have much to say in this first post. I don’t even know what my blog will specialise in or if it is going to specialise at all. I am thinking of writing down whatever it is I think about … this could be much but also nothing. Having said too much already I will finish this first words with only one warning. BEWARE!