error: '_Out_' has not been declared when including <Kinect.h>

error: '_Out_' has not been declared when including <Kinect.h>

我正在使用 CLion,我需要从 Kinect 获取一些数据,但是当涉及到 #include <Kinect.h> 时,我收到以下错误:

    In file included from C:/PROGRA~1/MICROS~2/Kinect/V2D305~1.0_1/inc/Kinect.h:547,
             from C:\Users\fredd\CLionProjectsD_avatar\main.cpp:19:
    C:/PROGRA~1/MICROS~2/Kinect/V2D305~1.0_1/inc/Kinect.INPC.h:109:13: error: '_Out_' has not been declared
         _Out_  WAITABLE_HANDLE *waitableHandle) = 0;
         ^~~~~

还有无穷无尽的类似错误列表。我想我错过了某种定义这种数据格式的库,但我真的不知道(如果那是问题的话)是哪一个。我在互联网上搜索了大约 3 个小时,但没有找到任何结果。 我该如何解决错误? 另外,有没有更好的方法让 Kinect 与 CLion 一起工作?

我已经设法理解发生了什么:MinGW 无法编译 SAL annotations,因此我不得不将编译器切换到与 Visual Studio 捆绑在一起的 MSVC。另外,我不得不在我的项目中使用 link MatLab,因为没有可以处理 Kinect v2 的库(除了 libfreenect2,这让我发疯)。