Skip to main content
This content is for SDK V4. App and App ID are now called Database and Database ID in SDK v5 and the Ditto Portal. The SDK v4 API names and the environment variable names used by the v4 quickstarts are unchanged. For the latest version, see the V5 documentation.

Installing the C++ SDK

Linux

To install the C++ SDK:
1
Fetch and extract the Ditto package. (Downloading and Unpacking Ditto)
2
Configure your app to link to the Ditto library. (Linking to Ditto)

Downloading and Unpacking Ditto

Download Ditto.tar.gz and unpack an archive containing the libditto.a static library and Ditto header:

Linking to Ditto

Add -lditto as a compilation step in the main.cpp source file:
For instructions on adding cross-platform Bluetooth Low Energy (LE) capabilities, see Bluetooth on Linux.BlueZ is the official Bluetooth protocol stack implementation for Linux systems to communicate with other Bluetooth-enabled platforms.

Importing and Initializing Ditto

From the source code of your app, using #include <Ditto.h>, use the ditto namespace, and provide your access credentials:
C++