Getting Your Source Files

Now that you have your host ready, packages installed, and the binder daemon ready, you can get your source files together. This example uses the helloworld-binding, which is a project hosted on GitHub, is written in the C programming language, depends on the libjson-c library, and uses cmake for building.

Install Programs and Libraries You Need for this Example

For this example, you need to have the following installed on your host:

git
cmake
pkg-config
gcc
g++
json-c
libsystemd

NOTE: If you are building a different binding, you need to make sure you have all the programs and libraries needed to build that particular binding.

Installing on Debian

Use the following commands if your native Linux machine uses the Debian distribution:

sudo apt-get install git cmake pkg-config gcc g++ libjson-c-dev libsystemd-dev

Installing on Fedora

Use the following commands if your native Linux machine uses the Fedora distribution:

sudo dnf install git cmake pkg-config gcc gcc-c++ json-c-devel systemd-devel

Installing on OpenSUSE

Use the following commands if your native Linux machine uses the OpenSUSE distribution:

sudo zypper install git cmake pkg-config gcc gcc-c++ libjson-c-devel systemd-devel

Cloning the helloworld-binding repository

Use Git to create a local repository of the helloworld-binding. The following command creates a repository named helloworld-binding in the current directory.

git clone https://github.com/redpesk-samples/helloworld-binding.git