Building and running a sample application
This step is needed to ensure that OpenNI was installed properly, and that the development environment is properly set up to enable you to build OpenNI-based applications.
To build and run a sample application:
- Make sure you have the latest Microsoft Platform SDK installed (You can currently download this via the following hyperlink: Microsoft's Platform SDK Web Install).
- Open Windows Explorer (or your favorite file navigator), and browse to OpenNI installation directory (default: C:\Program Files\OpenNI)
- In OpenNI directory browse to: Samples\NiSimpleViewer.
- Open the suitable project file, NiSimpleViewer.vcxproj, and build the application. If the build fails, contact PrimeSense support.
- After successfully building the project, before trying to run it, please ensure that the SamplesConfig.xml file is correctly configured:
- Browse to the 'Data' directory (the default location of this directory is C:\Program Files\OpenNI\Data).
- Open the SamplesConfig.xml for editing using a text editor (additional information can under Xml Scripts).
- Throughout the sample applications tutorial you will encounter use of relative paths in the sample application source files. Note that when your application is executed from within a debugging environment such as Microsoft Visual Studio, paths which are not absolute may not be resolved relatively to the output executable.
- Therefore, in order for the sample application to execute correctly in Debug mode, you should modify the Working Directory to be the sub-folder into which the executable is located. You can also use Visual Studio's macro $(TargetDir) instead of setting an actual path.
- Use "Project Properties"->"Debugging"->"Working Directory" to set the value.
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by 220.127.116.11