Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 7 (modified by patrick, 19 years ago) (diff)

Linux Coding Environment

This document describes the Linux coding environement, everything you will need to work on orxonox successfully and happily ever after. The guide is meant for all Linux distributions but specialy for Gentoo. Of yourse you can use different IDEs and if you have set up Orxonox on IDE that is not listed here, please don't hesitate to add your comments and tips.

Compiler

You will want to use the standard GNU gcc compiler that is shiped with all Linux distributions. MacOSX normaly uses the XCode environment, that can be found on all installation medias or on Apple XCode. For more compiler and installation related stuff refer to the installation section?.

Code Editors

After using xemacs with the ECB plugin, which we used successfully for small projects, we changed to the KDevelop editor, which is probably the best code editor in the whole open source world for the time being. We encourage you to install KDevelop

KDevelop Project Creation

  1. Start KDevelop and select Project -> Import Existing Project. Choose the repository directory as source directory. As project type choose Generic C++ Application (Automake Base). This will auto generate the project. There are some settings that you will have to get right to enable KDevelop to compile your program correctly:
  2. Code File Endings: Project->Project Settings->C++ Specific Section: Class Wizard Options::Implementation Suffix: Change it to .cc
  3. Configure Options: Project->Project Settings->Configure Options Section: Configuration:default, Top Source Directory Choose your source code directory. Do the same for Build Directory. You will be asked if KDevelop should re-run the configure script, yes, make it so! This should work smoothly

Now you are able to build the source by choosing Build->Build Project or by just hiting the F8 key.

KDevelop Misc Configurations

  • Some more Source Building Settings
    1. Project->Project Options->Make Options: Check the Abord on first error box. KDevelop will now stop on every error.
    2. Project->Project Options->CTags: Look at the Path section and look for the ctags application on your system: on the [www.gentoo.org Gentoo] system it is /usr/bin/exuberant-ctags.
  • Enable the Built-in Version Control System (doesn't work on all systems)
    1. Project->Project Options->CTags: Choose your Version Control System (for Orxonox it's subversion).
  • Source Code Formatting
    1. Settings->Configure Editor (this is only clickable if you have already opened a c++ source file to view)
    2. Check Remove trailing spaces
    3. Indentation: Select C Style for Indentation Mode
    4. Open/Save Check Replace tabs with spaces, and Remove trailing spaces
  • Integrate the Orxonox Doxygen Documentation
    1. Settings->Configure KDevelop, Source Formatter: Select GNU
    2. Documentation: Click on Doxygen Documentation Collection (in the lower middle) ⇒ Add: trunk/doc/html/index.html (this only works, if you have already generated the doxygen documentation with make doc in the orxonox trunk)