Before developing or using user-defined routines in C++, you must set up a build environment. First, ensure that cmake and gcc-8 are installed on your system.
Since version 7.3.2 you will find the C++ SDK installed as part of a full install of s-Server at
For best results you should compile your C++ UDFs, UDXs and UDAs on Centos. SQLstream s-Server is built on Centos and ensuring that Centos is used for user-defined C++ modules ensures that all required libraries will be present, and will use the exact same entry points.
Even though your modules are compiled on Centos, they can be deployed and executed on Ubuntu.
yum install scl-utils yum install devtoolset-8-gcc devtoolset-8-gcc-c++ scl enable devtoolset-8 -- bash source /opt/rh/devtoolset-8/enable
yum install cmake
Check gcc version:
which gcc /opt/rh/devtoolset-8/root/usr/bin/gcc
Permanently enable devtoolset-8 by adding this line to .bash_profile:
echo "source /opt/rh/devtoolset-8/enable" >> ~/.bash_profile
sudo apt-get install cmake gcc-8 g++-8 export CC=/usr/bin/gcc-8 export CXX=/usr/bin/g++-8
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, and copy the SDK to it.