Example Prep

Video and Text Content

Each example contains a video explanation and follows up with details in text. We suggest that you watch the video first, read through the text, then try making suggested changes to the examples and rebuilding.

Finding the Example Files

The example source code, binaries and training data are distributed across these folders, relative from your install folder.

  • example source code : $ACTIN_HOME/examples/example1..4
  • example data : $ACTIN_HOME/share/data/data/training
  • example binaries : $ACTIN_HOME/examples/build/bin

where $ACTIN_HOME is the folder where you installed the Actin SDK.

The examples are built from within the examples/build folder using make, and then executed from within the examples/build/bin folder.

Setting up your Environment for Ubuntu

A shell script (or .bat file) is located in the build folder for you to set your environment variables. These include paths to data, toolkits.

    $ source build/SETUP.sh

In addition, we recommend that you add one for your actin install folder to reduce the typing as you work through these examples.

    $ export ACTIN_HOME=~/Energid/actin
    $ export LD_LIBRARY_PATH=~/Energid/ActinSDK<....>/lib     //wherer ActinSDK is the folder with your version of the SDK
Building the Examples

We'll assume that you've already installed Actin and built the example binaries. If not, please follow this training course first: Actin Installation and Build


This is the same for the first four examples. The general idea is to provide a very simple console application that starts each example.

  • initialize the Actin license handler
  • create an instance of Example1 class
  • call setup and run methods for the example1
  • shutdown the license handler.

Any exceptions thrown will print out to the console on std::err

Common Code

The four examples are similar in the way the code is designed and the build is run. We'll explain the first example in some detail, and then point out what's different for examples 2..4.

Now, on to the examples...