获取Kinect SDK在Visual Studio 2010中使用c ++ [英] Getting the Kinect SDK to work with visual studio 2010 in c++

查看:157
本文介绍了获取Kinect SDK在Visual Studio 2010中使用c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在追踪microsoft为使用c ++设置Kinect SDK所做的指导。他们创建的步骤如下。


  1. 在源代码中包含windows.h。

  2. 要使用NUI API,请包括MSR_NuiApi.h。
    位置:程序文件\Microsoft Research KinectSDK \inc

  3. 要使用Kinect Audio API,请添加MSRKinectAudio.h。
    位置:Program Files\Microsoft Research KinectSDK\inc

  4. 链接到MSRKinectNUI.lib。
    位置:程序文件\Microsoft Research KinectSDK \lib

  5. 确保运行项目时,beta SDK DLL位于路径上。
    位置:\Program Files\Microsoft Research KinectSDK

我相信我已经做了一切,除了步骤5。任何人都可以给我更多关于这是什么意思和如何做的细节?



提前感谢
John

解决方案


2.要使用NUI API,请包括MSR_NuiApi.h。位置:Program Files\Microsoft Research KinectSDK\inc


为此,您可能希望将该路径添加到您的项目




  • 右键单击您的项目,属性,VC ++目录

  • 添加 ; C:\Program Files\Microsoft Research KinectSDK\inc 到包含路径的末尾

  • 添加; C: \Program Files\Microsoft Research KinectSDK\lib 到库路径的末尾



然后添加

  #include< MSR_NuiApi.h> 

到源文件顶部的包含。如果您使用预编译头,那么应该将其放在stdafx.h include下面,或者将其添加到stdafx.h。


5.确保运行项目时,beta SDK DLL位于您的路径上。位置:\Program Files\Microsoft Research KinectSDK


这意味着您的二进制文件需要能够在运行时找到这些文件。



最简单的方法是将它们添加到系统路径中;


  • 开始菜单

  • 右键单击计算机,属性

  • 高级系统设置

  • 环境变量

  • PATH,在您的用户或系统设置中 - 编辑并附加; 然后给出路径



然后您可能需要重新启动Visual Studio才能选择它,当您打开新的命令提示符时,请注册。



或者,如果不想更改系统设置,您可以将它添加到一个开放的命令提示符与

  PATH =%PATH%; C:\Program Files\Microsoft Research KinectSDK 

或者您可以准确确定哪些文件是必需的,并将它们复制到与二进制文件相同的目录中,等等。


I've been following the guide microsoft have made for setting up the Kinect SDK with c++. The steps they have created are as follows.

  1. Include windows.h in your source code.
  2. To use the NUI API, include MSR_NuiApi.h. Location: Program Files\Microsoft Research KinectSDK\inc
  3. To use the Kinect Audio API, include MSRKinectAudio.h. Location: Program Files\Microsoft Research KinectSDK\inc
  4. Link to MSRKinectNUI.lib. Location: Program Files\Microsoft Research KinectSDK\lib
  5. Ensure that the beta SDK DLLs are on your path when you run your project. Location: \Program Files\Microsoft Research KinectSDK

I believe I've done everything apart from step 5. Could anyone give me more details on what this means and how to do this?

thanks in advance, John

解决方案

2.To use the NUI API, include MSR_NuiApi.h. Location: Program Files\Microsoft Research KinectSDK\inc

To do this, you probably want to add that path to your project

  • Right-click on your project, properties, VC++ directories
  • Add ;C:\Program Files\Microsoft Research KinectSDK\inc to the end of the include paths
  • Add ;C:\Program Files\Microsoft Research KinectSDK\lib to the end of the libraries paths

then add

#include <MSR_NuiApi.h>

to the includes at top of your source file. If you're using precompiled headers then you should put it below the stdafx.h include, or just add it to stdafx.h instead.

5.Ensure that the beta SDK DLLs are on your path when you run your project. Location: \Program Files\Microsoft Research KinectSDK

This means that your binary needs to be able to find these files at runtime.

The easiest way to do this is to add them to your system path; go to

  • start menu
  • right-click computer, properties
  • advanced system settings
  • environment variables
  • PATH, in your user or system settings - edit and append ; then the path given

You may then need to restart Visual Studio to pick this up, or it should be registered when you open a new command prompt.

Or, if you don't want to change the system settings, you can e.g. add it to an open command prompt with

PATH=%PATH%;C:\Program Files\Microsoft Research KinectSDK

or you can work out exactly which files there are necessary and copy them into the same directory as your binary, etc.

这篇关于获取Kinect SDK在Visual Studio 2010中使用c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆