To simplify its C++ development, Vivoka works with the Conan package manager. You can find its official documentation here.

Install Conan

Conan requires Python 3, so:

  1. To install Python 3 you can either use your package manager (Linux) or download it (Windows). You may need to add paths to the environment depending on how you install it (look at the advanced options).

  2. Then, use pip install conan (install as root on Linux). If you have any trouble, please follow the official tutorial.

If you ever get an error like [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired, that means your version is outdated!

Configure Conan

We have a custom Conan server at Vivoka to deliver our SDK and its dependencies. To configure it you need to register the remote server with the following commands:

conan profile new default --detect
conan remote add vivoka-customer https://conan-customer.vivoka.com/artifactory/api/conan/vivoka-customer
conan config set general.revisions_enabled=1
conan user <username> -r vivoka-customer -p <password> # Use your VDK login
BASH

You can set the password in the CONAN_PASSWORD_VIVOKA_CUSTOMER environment variable if you want to avoid inputting it regularly.

Linux

Most likely Conan will emit a warning about the version of your libstdc++, so run this command:

conan profile update settings.compiler.libcxx=libstdc++11 default
BASH

Windows

VDK 4 offcially supports MSVC 15 and 16 (which maps to Visual Studio 2017 and 2019). To be sure that Conan detected a compatible version, print it:

conan profile get settings.compiler.version default
CODE

While our binaries should be mostly compatible with Visual Studio 2022, it is not supported so use at your own risks!

Install CMake

This is our build system, version >= 3.13 is needed. You can either get it via your Linux package manager or the official installer.

Compilation

Go to the root of the sample and execute these commands:

# First install the dependencies (do it once)
conan install . -if build

# Build the program
conan build . -bf build
BASH

Execute samples

Linux

source ./build/activate_run.sh # this temporarily exports LD_LIBRARY_PATH for you
./build/bin/<executable>
source ./build/deactivate_run.sh # unexport LD_LIBRARY_PATH
BASH

Windows using cmd.exe

.\build\activate_run.bat
.\build\bin\<executable>.exe
.\build\deactivate_run.bat
BASH

Windows using PowerShell

.\build\activate_run.ps1
.\build\bin\<executable>.exe
.\build\deactivate_run.ps1
POWERSHELL