We've built a simple console application that demonstrates how LaunchDarkly's SDK works. Below, you'll find the basic build procedure, but for more comprehensive instructions, you can visit your Quickstart page or the C/C++ SDK reference guide page. Use this as a starting point for integrating the c-client-sdk with your application.
- Edit
hello.cpp
and set the value ofMOBILE_KEY
to your LaunchDarkly mobile key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, setFEATURE_KEY
to the flag key.
#define MOBILE_KEY "YOUR_MOBILE_KEY"
#define FEATURE_KEY "YOUR_FEATURE_KEY"
- Download the latest SDK for your platform with
fetch-linux.sh
,fetch-mac.command
, orfetch-windows.ps1
. - Build for your platform with
build-linux.sh
,build-mac.command
, orbuild-windows.ps1
. - On the command line, run
./hello
.
You should receive the message "Feature flag '<flag key>' is <true/false> for this user"
.