C++ Quickstart (Temp)
This installation guide provides step-by-step instructions on installing and setting up the Ditto SDK in your C++ project.
To integrate Ditto with your app:
- Add a reference to the Ditto static library in your project’s build configuration settings. (Installing Ditto)
- Add a linker flag to the Ditto static library in your project’s build configuration settings. (Linking Your App to Ditto)
- Add Ditto to your C++ code and initiate data sync. (Initializing Ditto)
Installing Ditto
Install the SDK’s libditto.a
static library and Ditto.h
header files by downloading and extracting Ditto.tar.gz
in your project’s ./sdk/
directory:
Linking Your App to Ditto
Configure your app to link your C++ code to the Ditto static library at compilation time by doing either of the following as appropriate:
If developing for Linux, create the executable file in the ./dist directory from your main.cpp file and add the -lditto linker flag to your project’s build configuration settings:
Initializing Ditto
Finish integrating Ditto with your app by establishing an identity for your app, initializing Ditto, setting up the minimum log level for debugging, and starting the data sync process with the Ditto backend:
Was this page helpful?