My First Project Windows ViiM2

This tutorial is for Visual Studio 2010 and 2012 (Main tutorial for 32bits, but with notes on how to setup the 64bits version). The screenshots are from the Visual Studio 2012 version, but it should be the same in the 2010 version.

1) Create a new Visual Studio project: File -> New Project. Choose Visual C++ in the left pane -> Win32 Console Application, give it a name and press OK. In the new window click Next and then configure the next window just like this 2) Now you will add a new file: Expand the Solution Explorer on the left of the screen and right click on the Source Files folder -> Add -> Add New Item. Now choose Visual C++ on the left, C++ file(.cpp) on the center, give it a name and press Add. Important note: If you are going to build a x64 application with ViiM's x64 libs, then you have to change the project platform from Win32 to x64: 1) Click on that Win32 dropdown menu from the main window and click Configuration Manager... 2) On the right, in Active Solution Platformtform: click  3) In the New Platform, choose x64 4) press OK and Close. 3) And now you will configure your project: Project -> Properties. 4) You can now apply the changes and press OK. One of the changes within OpenNI2 is that OpenNI2.dll and NITE2.dll must be in the same path as the executable. So browse to C:\Program Files (x86)\OpenNI2\Samples\Bin and copy OpenNI2.dll to your executable folder. Now browse to C:\Program Files (x86)\PrimeSense\NiTE2\Samples\Bin and do the same to NiTE2.dll. The sensor's drivers also suffered from the same treatment, so in order to run the executable from the explorer you must copy the OpenNI2 folder from one of those locations to your executable path as well. If you want to run the executable from within Visual Studio, copy the OpenNI2 folder to the FirstProject folder inside your main FirstProject folder. You can see both options in the two images below: 5)Finally in the file you added in step 2, include ViiM with #include and you're ready to go! 6) Here is ViiM "hello world" application. You create the ViiM object, start the sensor and constantly update the frames per second and print it to the terminal. You can download the project in the end of this page. Visual Studio 2012 x86 MyFirstProject
 * Configuration Properties
 * General: switch Platform toolset to Visual Studio 2012. If you're using Visual Studio 2010, skip this step!
 * C/C++
 * General: In Additional Include Directories click on the arrow and press edit.... In the new window write the lines $(VIIM2_INCLUDES32), $(OPENNI2_INCLUDE) and $(NITE2_INCLUDE).
 * Configuration Properties
 * Linker
 * General: In Additional Library Directories click on the arrow and press edit.... In the new window write the lines $(VIIM2_LIBS32)  ($(VIIM2_LIBS64) if on 64bits).
 * Configuration Properties
 * Linker
 * Input:In Additional Dependencies click on the arrow and press edit.... In the new window write the line ViiMd.lib(ViiM64d.lib if using ViiM 64bits). (notice that if you use ViiMd.lib you will use ViiM's Debug library and if you use ViiM.lib you will use the Release version - same logic for both 32 and 64 bits).