我是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.lib。
转到项目属性|配置属性|链接器|输入|其他依赖项。
添加OpenNI.lib