A simple way to meet GATB-CORE is to download this project.
This file holds all the required material to build a “Hello World” like binary based on GATB-CORE. In particular, a few source files are generated and may be compiled to build this minimal application.
The generated source provides a ‘main’ function and a HelloWorld class whose ‘execute’ method holds a default behavior. You can have a look here to have an idea of what the HelloWorld class (as a child of Tool) provides to the devlopper.
GATB-CORE uses the CMake tool, so you have first to install it if needed.
The HelloWorld archive has the whole material to be compiled. It means:
- All the source code is available (including the GATB-CORE source code), so you don’t need to install other dependencies
- The CMake files are configured to compile the GATB-CORE artifacts and the HelloWorld sample
As usual with CMake, it is better to create a build directory and generate all the artifacts in this directory. The straightforward way is so:
mkdir build; cd build; cmake ..; make
At the end of the build, you should have a HelloWorld binary. Note that several artifacts have been generated during the compilation of GATB-CORE. They are not relevant right now for the HelloWorld project but they will be most useful in other contexts.
If you succeeded in generating the HelloWord binary, you can reuse this project for more experimentations. In particular, you can modify the ‘main’ function as you wish and then rebuild the binary.
You can access here many snippets that show how to use the GATB-CORE features. You just have to copy the code of one snippet and replace the content of our main.cpp file with it and then recompile the project.