Quickstart for C++
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)
Install the SDK’s libditto.astatic library and Ditto.h header files by downloading and extracting Ditto.tar.gz in your project’s ./sdk/ directory:
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:
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: