Development IDEs

Overview

Here is a small compilation about debugging tools and how to set them up to start developing OGS. There are several development IDE’s available, both open-source or commercial. Some are multi-platform, others are platform-specific.

Here is a link list without specific order:

The steps to get things started with an IDE basically include generating the project files, importing them in the IDE and know where to provide arguments to the debugging binary.

I will assume, that you have the sources (eg. checked out from github) and that they lie in the source directory

Please, create a seperate build directory for your favorite IDE like


GDB

https://www.sourceware.org/gdb/download

Screenshot

Create project files

  1. CD to the build directory
  2. Generate project files with CMake:
  1. Start gdb in graphical mode, without license info (quiet) and with arguments:
  1. Have fun…

Documentation: https://sourceware.org/gdb/onlinedocs/gdb/index.html


Eclipse

http://www.eclipse.org/downloads

Choose “Eclipse IDE for C/C++ Developers”

Screenshot

Import Code

  1. CD to the build directory
  2. Generate project files with CMake:
  1. Open Eclipse and choose File - Import - Existing Project into Workspace
  2. Select the build directory and click Finish (Attention: Make sure to not check the option Copy projects into workspace!)
  3. To provide arguments, you will have to run the project once: Run - Debug (running will start building first, if not already done).
  4. Then, give arguments via Run - Debug Configuration - C/C++ Application - ogs. Choose Arguments tab on right side and add your arguments to the line C/C++ Application, e.g.
  1. Start debugging…

Documentation: http://wiki.eclipse.org/Main_Page


Code::Blocks

http://www.codeblocks.org/downloads
or
https://code.google.com/p/fortranproject

The latter includes already plugins for Fortran, in case you want to cross-compile.

Screenshot

Import Code

  1. CD to the build directory
  2. Generate project files with CMake:
  1. Open an existing project and choose before created .cbp file
  2. Choose your compilation target
  3. Give arguments: Project - Set Programs’ Arguments, select correct target and add Program arguments in the bottom
  1. Rock the show…

Documentation:


NetBeans

https://netbeans.org/downloads

Screenshot

Import project files

  1. Open NetBeans
  2. Choose File - New Project - C/C++ Project with Existing Sources (Click Next >)
  3. Specify sources directory, select configuration mode Custom
  4. Check Run Configure Script in Subfolder
  5. Click Next > until Finish
  6. Give arguments via Run - Set Project Configuration - Customize
  7. Under Run, give Run Command on right side:
  1. When starting debugging, choose correct target
  2. Have a great time…

Documentation: https://netbeans.org/kb/index.html


CLion

Download: https://www.jetbrains.com/clion/

Screenshot

Import project

You don’t need a build-directory for CLion. It will create it by itself.

  1. File / Import Project
  2. Choose source-directory
  3. When prompted do not overwrite CMake file, instead choose Open Project
  4. Under Run / Edit Configurations choose the ogs-target and set the program working directory and arguments
  5. On the top right choose the ogs-target and click the green Debug-button

Documentation: https://www.jetbrains.com/clion/help/introduction.html


This article was written by Marc Walther. If you are missing something or you find an error please let us know. Generated with Hugo 0.47.1. Last revision: February 26, 2018
Commit: [web] Finished development workflows section in devguide. 88ba0e067  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum