= Linux Coding Environment = This document describes the Linux coding environement, everything you will need to work on orxonox successfully and happily ever after. == 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 [http://www.apple.com/de/macosx/features/xcode/ Apple XCode]. For more compiler and installation related stuff refer to the [wiki:Running installation section]. == Code Editors == We are using [http://www.kdevelop.org/ KDevelop] editor, which is probably the best code editor in the whole open source world for the time being. We encourage you to install [http://www.kdevelop.org/ KDevelop] [[br]] === KDevelop Project Creation === 1. Start KDevelop and select '''Project->Import Existing Project'''. [[br]] Choose the repository directory as source directory. [[br]] As project type choose '''Generic C++ Application (Custom Makefiles)'''. [[br]] This will auto generate the project files. === Complier Settings === There are some settings that you will have to get right to enable KDevelop to compile your program correctly. The options and menu setting change often between different versions of kdeveloper. So don't be surprised, if it won't look exactly the same on your IDE. The settings listed in this tutorials are for the kDeveloper version 3.3.2 with KDE libs 3.5.2 (you can look them up in '''Help->abou KDevelop'''). 1. C++ file endings: [[br]] Select: '''Project->Project Settings''', go to section: '''C++ Specific''', there look out for: '''Class Wizard Options->Implementation Suffix''', change it from '''.cpp''' to '''.cc''' (since we call our files .cc and not .cpp) 1. Project build options: [[br]] Select '''Project->Project Settings''', go to section: '''Build Options''', change to tab '''Make''', there check the fields: '''Abord on first error''' and increase '''Number of simultaneous jobs''' to '''2''' or '''3''' 1. Project run options: [[br]] Select {{{Project->Project Settings}}}, go to section: {{{ Configure Options }}}, look out for: {{{Configuration:default, Top Source Directory}}} Choose your source code directory. [[br]] Do the same for {{{Configuration:default, Build Directory}}}. (Note: If you are working on ETHZ Linux computers, you will have to add the {{{configure flags}}} {{{--with-tadis}}} [[br]] 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. === Code Formatting Settings === * Source Code Formatting 1. Choose Menu: '''Settings->Configure Editor''' (this is only selectable if you have already opened a c++ source file to view) 1. Choose section '''Editing''': Check the '''Insert spaces instead of tabulators''', '''Remove trailing spaces''' box. 1. Choose '''Indentation''': Select '''C Style''' for '''Indentation Mode''', make sure '''Use spaces instead of tabs to indent''' is checked (this is sometimes also found in another section, just go on) '''Number of spaces''' should be set to '''2''' 1. Choose '''Open/Save Check''': Mark the '''Replace tabs with spaces''', and '''Remove trailing spaces''' boxes. * More Source Code Formatting: 1. Choose Menu: '''Settings->Configure KDevelop''', '''Formatting''': Select '''User defined''' and then change to tab '''Indentation''', make sure that the following settings are set like this: * '''Use spaces''' set to '''2''' * === Including the Orxonox Documentation === * Integrate the Orxonox Doxygen Documentation 1. 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) === Misc Settings === * Some more Source Building Settings 1. {{{Project->Project Options->CTags}}}: Look at the {{{Path}}} section and look for the ctags application on your system: on the [http://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. Choose Menu: {{{Project->Project Options->Version Control}}}: Choose your Version Control System (for Orxonox it's subversion).