|
Elektra 0.8.26
|
This basic tutorial shows you how to compile and run a very basic Elektra application. For this tutorial we assume that you installed Elektra and CMake on your machine. We also assume that you work a Unix based OS like Linux or macOS.
Save a file with the following content
as CMakeLists.txt in the folder Hello.
Create a build directory inside Hello, change into the build directory, and run Cmake:
. If everything worked until now, then CMake should print messages that look something like this:
No it’s time to build your application. For that step run make inside the folder Hello/build:
. If the last step completed successfully, then the build directory now contains the application hello.
You can now run your Elektra application by calling ./hello inside the build directory. The output of the application should look something like this: