1

我是 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

请问我可以得到任何帮助吗?提前致谢!

4

1 回答 1

5

听起来您需要在链接器中包含 OpenNI.lib。
转到项目属性 | 配置属性 | 链接器 | 输入 | 附加依赖项。
添加 OpenNI.lib

于 2011-12-23T02:12:11.853 回答