C++ examples are located in the subfolder examples/cxx
.
${install_dir}/examples/cxx/mtk_license.cxx
. When you become a customer you will substitute it with a commercial license key.C++ examples are provided with cmake-based configuration files. To build examples download the cmake
tool from cmake.org.
To build C++ examples open cmake-gui, choose the example's subdirectory, choose build directory and press "Configure" button.
Next specify required Visual Studio version (e.g. Visual Studio 15 2017 Win64
).
When configuring has been done press "Generate" button.
This will create Visual Studio project and solution files in the build subdirectory.
To build an example on Linux or MacOS with the help of GNU make, use respective generator with cmake:
cmake --help
. -DCMAKE_BUILD_TYPE=Debug
.To run built examples, you should add the path to Manufacturing Toolkit dynamic libraries directory to the environment variable LD_LIBRARY_PATH
on Linux and DYLD_LIBRARY_PATH
on MacOS.
Manufacturing Toolkit should work out of the box with the standard compiler options. Exception support should be enabled to ensure their proper handling (/EHa
or /EHsc
flags in MSVC, -fexceptions
in Clang and GCC).