1. Follow the instruction on OpenNI official website
2. Copy the code from Samples->SimpleRead->main.cpp to your VS project main.cpp file
3. Debug your program
1. If you get error LNK2019 from Visual Studio Console output, you might building your project for Win32 platform on your 64bit Windows, try swiching to x64.
2. If you get error message from your program console: “Failed to initialize OpenNI Found no files matching ‘.\OpenNI2\Drivers\*.dll'”, make sure you have set your working directory correctly.
The same procedure can be applied to setup NiTE2. NiTE is the middle ware library build up upon OpenNI, thus all the settings for OpenNI are needed. Be aware of the version of the glut library you are using, should be matching with the debugging platform (32bit or 64bit) as well.