Elektron SDK - C/C++

API Family: Elektron

ESDK Build System

Last update May 2018
Environment Windows, Linux
Prerequisites Download and install the CMake Build System for your system environment


Prior versions of the ESDK (Elektron SDK) provided the static build files Solution and vcxproj for Windows, and Makefile for Linux. As of ESDK Version 1.2, the package includes a flexible, cross-platform build system called CMake.  CMake generates cleaner, more concise build environment files that correspond to a users’ platform and OS. In addition, it enables the creation of build environments on platforms that users wish to leverage, even if unsupported by the ESDK product.  For a detailed explanation of the build system, refer to the Migration Guide outlined within either the Elektron Message API or Elektron Transport API documentation packages.

In this quick start guide, we will walk through the steps to:

  • Download the ESDK package
  • Generate the projects files for each example application using the CMake build system
  • Build the entire tree of examples available within the package

Steps apply to both the Windows and Linux environments.

Download ESDK

The Elektron Message API (EMA) and Elektron Transport API (ETA) products are included as part of the ESDK package.  To access the package for either Windows or Linux, navigate to the Elektron SDK - C/C++ Edition webpage within the Developer Portal.  Within the Downloads tab, choose your package and and uncompress within a directory of your choosing. 

Once extracted, the root of your ESDK should look like the following:

Note: Within Linux, ensure you execute the following command within the ESDK root installation:


Generate your project files - CMake

Ensure you have downloaded and installed the CMake utility (version 3.10 or higher) within your environment.  Once installed, you are ready to generate the project files specific to your compiler and operating system of choice.  The instructions outlined below are the basic commands to generate project files for their respective environments.  You can refer to the Migration Guide for a complete list of options and additional details.

The CMake utility requires the root directory of your ESDK installation and a location where all project files are generated.  The following examples are builds performed within my environment based on my compilers of choice.

Windows (Visual Studio 2017)

Based on the location where I installed the ESDK package, the following command was executed:

cmake -H\Users\u8007876\Downloads\Elektron-SDK1.2.0.win\setup\Elektron-SDK1.2.0.win.rrg -Bcmake_vs2017 -G "Visual Studio 15 2017 Win64"

If successfully completed, the specified build directory: cmake_vs2017 looks like this:

Linux (RedHat gcc 4.4.7)

Based on the location where I installed the ESDK package, the following command was executed:

cmake -H/devtree/linux/Elektron-SDK1.2.0.linux.rrg -Bcmake_gcc447

If successfully completed, the specified build directory: cmake_gcc447 looks like this:

Linux (CentOS gcc 4.8.5)

For CentOS 7.4, CMake version 3.10 was not available pre-packaged, and so had to be built from source code using the following steps.

Note: Although CentOS is not an officially supported platform, it does demonstrate the usage capabilities on alternative operating sytems.

These steps are a rough guide, and may not match your Linux distribution.

# Download source code
wget https://cmake.org/files/v3.10/cmake-3.10.3.tar.gz

# Extract
tar -xvf cmake-3.10.3.tar.gz

# Build package
cd cmake-3.10.3
sudo ./bootstrap --prefix=/usr/local
sudo make
sudo make install

# Add to path
vi ~/.bash_profile


Additionally, Git and OpenSSL tools are required by EMA targets, and have to be installed:

# Install git
sudo yum install git

# Install OpenSSL
sudo yum install openssl
sudo yum install openssl-devel

Verify the CMake version:

To generate the project makefiles, we will be instead run the utility from the ESDK root:


This will place the makefile for all the consumer and provider samples in the ESDK root \SOLUTION_FILES\Cpp-C\Ema\Examples\Training directory.

See the list of CMake generators that can be specified as possible targets. Refer to the troubleshooting steps below if you run into any issues.

Building the environment

Once you have successfully completed the steps to generate the project files for your specific environment, you can test the build system by compiling the top level project file which generates ESDK libraries for your environment and uses these libraries to build all packaged examples.  The screenshots above for both Windows and Linux generated top level project files, specifically, ALL_BUILD.vcxproj and Makefile within your Windows and Linux build directories respectively.  

Once the build has successfully completed, a new directory called Executables will be created within each API product.  For example, when I navigate to the ETA API within the ESDK package, I can see the newly generated directory:

The Executables directory contains the collection of examples based on your compiler of choice.


In the event any issues occur during the build process, try any of the known steps below to resolve.

  • Cmake is failing when accessing GitHub

    For example:

    As of February 2018, GitHub has updated their cryptographic standards.  Follow GitHubs recommendations to resolve this issue.