Search code examples
c++visual-studio-2013kinectkinect-sdk

Visual Studio 2013 and Kinect SDK 2.0 Cannot find or include <NuiApi.h>


I am learning Kinect development using C++ in Visual Studio 2013 (Desktop version on Windows 8.1). I have downloaded the Kinect SDK 2.0 from Microsoft. According to my understanding, NuiApi.h is part of Kinect SDK 2.0. However, I cannot include it (#include says Cannot open source file). Have searched my computer for the file but couldn't find it. Reinstalled Kinect SDK with no luck. Below is the related part of the code:

#include<iostream>
#include<Windows.h>
#include<kinect.h>
#include<NuiApi.h>

A similar header, NuiKinectFusionApi.h, can be included without a problem.


Solution

  • You are mixing the 2 kinect versions!

    for the kinect v1, you need to download kinect v1.8 drivers and then use the NuiApi.h

    for the kinect v2, you need to download kinect v2.0 drivers and then use the kinect.h