Compiling under CLion


currently I have successfully compiled the examples and my own code under C. But several of the examples uses C++ (even the “C” ones which uses C++ classes). If I try to use C++ I get linker errors:

For example, compiling BodyReaderEventCPP leads to

C:\Program Files\JetBrains\CLion 2022.2\bin\mingw\bin/ld.exe: cpp-api/BodyReaderEventCPP/CMakeFiles/BodyReaderEventCPP.dir/__/__/common/camera_orbbec.cpp.obj: in function `void __gnu_cxx::new_allocator<ob::Pipeline>::destroy<ob::Pipeline>(ob::Pipeline*)':
C:/PROGRA~1/JETBRA~1/CLION2~1.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/ext/new_allocator.h:168: undefined reference to `__imp__ZN2ob8PipelineD1Ev'

Has anyone experienced a similar issue?