2011-12-10 47 views
1

我是OpenNI中的新成员。当我试着使用Visual Studio 2010的C++ OpenNI样品, 我得到了这些错误:Kinect和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 

我能得到任何帮助吗? 在此先感谢!

回答

5

听起来像你需要在链接器中包含OpenNI.lib。
前往项目属性|配置属性|链接器|输入|其他依赖关系。
Add OpenNI.lib