Building the C++ Client Library

Requirements

  • Microsoft Visual Studio 2017

  • Visual C++ v141 build tools

  • .Net framework 4.7.1 SDK (needed for our build process automation tools)

Get the Source Code

The source code of the C++ client library is available on Github. You can either get the source package of the latest version, or clone the git repository. If you choose to clone the repository, you can build from the master branch, which tracks the releases, or the develop branch, which has the lastest changes but might be unstable.

How to Build

The client library is located under src/clients/cpp. There is a Visual Studio solution for each supported platform. Note that the open source version of the library currently only supports Windows and Android. If you need support for other platforms, please contact us.

Simply open and build the Visual Studio solution for your platform and configuration of choice.

The build products are located in the output directory by default. output/include contains the header files, and output/libs the static libraries.

Plugins

Plugins can be added to the library on-demand. To do so, create a file named plugins.json under src/clients/cpp. It should have the following format:

{
        "plugins": [
                { "name": "<name of a plugin>" },
                ...
        ]
}

Note that plugin dependencies are not automatically handled. So for instance, if you want to include the Authentication plugin, you also need to explicitly include the Core plugin, which Authentication depends on.

For instance, if you need plugins Authentication and GameFinder, you would write the following plugins.json:

{
        "plugins": [
                { "name": "Core" },
                { "name": "Authentication" },
                { "name": "GameFinder" }
        ]
}

Note that the order in which the plugins are specified doesn’t matter.

The plugins will automatically be built along the Stormancer library, and added to the final static library file. Their public header files will be added to the output/include folder.