Kinect and OpenNI

Kinect and OpenNI

本文关键字:OpenNI and Kinect      更新时间:2023-10-16

我是OpenNI的新手。当我用Visual studio 2010 c++尝试OpenNI样本时,我得到这些错误:

1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnContextRegisterForShutdown
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnContextAddRef
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnContextRelease
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnContextUnregisterFromShutdown
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnForceShutdown
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnInit
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnGetStatusString
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnGetRefContextFromNodeHandle
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnProductionNodeAddRef
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnProductionNodeRelease
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnCreateDepthGenerator
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnStartGeneratingAll
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnOSMemSet
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnOSFreeAligned
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnOSWasKeyboardHit
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnWaitOneUpdateAll
1>kinect_first_try.obj : error LNK2001: unresolved external symbol __imp__xnGetDepthMetaData

请帮我一下好吗?提前感谢!

听起来你需要包括OpenNI。
进入项目属性|配置属性|链接器|输入|附加依赖项。
div添加OpenNI.lib