Tips for using KDevelop as your IDE

How to make Orxonox a KDevelop project

If you want to code comfortable then we suggest you to use an IDE. The below steps describe how to use KDevelop as your IDE.

1.a) Go to the orxonox build directory:

cd ~/orxonox/trunk/build

1.b) Make sure you didn't run cmake before in this directory. If you did, just remove the CMakeCache file (note: you will have to rebuild the project afterwards, if you do this)

rm -f CMakeCache.txt
  1. Let cmake produce the basic KDevelop project file:
    cmake -GKDevelop3 ..
  2. Run KDevelop and open your project file (Project -> Open Project)

Optimize KDevelop

Do some configursation to make the usage of KDevelop smoother

Go to Project->Project Option->Build Option->Make, and do the following changes

  • Select Run Multiple Jobs, and set Number of Simultaneous Jobs to 3
  • set Make Prority to 5
  • Optional: Add Environment Variables
    • i.e Name: CXXFLAGS; Value: -O2 -pipe
    • CXXFLAGS or LDFLAGS are also possible. In fact any compiler flags can be set here
      If you don't know what CFLAGS are, don't set them, otherwise use at you own discretion. Only reasonable flags will be supported

Go to Project->Project Option->Run Option

  • Working Directory: just add /bin you still need to run ./run-script the first time

Improve your productivity with KDevelop

In order to improve productivity you can activate / benefit from some features.


  • F8: Build the Project
  • F9: Start the debugger (gdb based)
  • If you want to define further shortcuts (i.e. Run Application) then you can configure them in Settings -> Configure Shortcuts

Code Completion

If you want to use code completion do the following steps:

  1. Go to Project Options and select C++ Support.
  2. Enable Automatic Code Completion and set the preferred options.

Split of Header/Source files

If you want to benefit from the following feature then follow the below steps.

  1. Go to Project Options and choose C++ Support.
  2. Select Navigation, enable Enable split of Header/Source files and change Orientation to Horizontal (if you want to)
  3. Choose File Groups and change Sources to "*.cc;*.cpp;*.c;*.C;*.cxx" (append *.cc)
  4. Open a Source file and press Shift + F12" (or alternatively just open the Header file and hope it works ;))