Installing the C++ SDK

Before developing or using user-defined routines in C++, you must set up a build environment. First, ensure you have cmake and gcc/g++ installed.

On Ubuntu 20.04

sudo apt-get install cmake gcc-8 g++-8
export CC=/usr/bin/gcc-8
export CXX=/usr/bin/g++-8

On Centos 7.x:

yum install scl-utils
yum install devtoolset-8-gcc devtoolset-8-gcc-c++
scl enable devtoolset-8 -- bash
source /opt/rh/devtoolset-8/enable

Install cmake:

yum install cmake

Check gcc version:

which gcc

Permanently enable devtoolset-8 by adding this line to .bash_profile:

echo "source /opt/rh/devtoolset-8/enable" >> ~/.bash_profile

Using the C++ SDK with Docker images

NOTE If you are using a SQLstream docker image or VM appliance, this C++ environment is not currently pre-installed. You will need to derive a new image from one of the standard sqlstream/xxx images.