使用Nite和OpenNI时出现LNK2019错误

时间:2014-03-28 08:07:41

标签: openni

我以前从未见过LNK 2019的错误,现在当我尝试链接我从Nite获得的代码时遇到它。

错误是......

1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteShutdownHandTracker referenced in function "public: void __thiscall nite::HandTracker::destroy(void)" (?destroy@HandTracker@nite@@QAEXXZ)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteStartHandTracking referenced in function "public: enum nite::Status __thiscall nite::HandTracker::startHandTracking(class nite::Point3f const &,short *)" (?startHandTracking@HandTracker@nite@@QAE?AW4Status@2@ABVPoint3f@2@PAF@Z)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteReadHandTrackerFrame referenced in function "public: enum nite::Status __thiscall nite::HandTracker::readFrame(class nite::HandTrackerFrameRef *)" (?readFrame@HandTracker@nite@@QAE?AW4Status@2@PAVHandTrackerFrameRef@2@@Z)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteHandTrackerFrameRelease referenced in function "public: void __thiscall nite::HandTrackerFrameRef::release(void)" (?release@HandTrackerFrameRef@nite@@QAEXXZ)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteStartGestureDetection referenced in function "public: enum nite::Status __thiscall nite::HandTracker::startGestureDetection(enum nite::GestureType)" (?startGestureDetection@HandTracker@nite@@QAE?AW4Status@2@W4GestureType@2@@Z)
1>D:\AcerUser\Documents\Visual Studio 2013\Projects\kinect\Debug\kinect.exe : fatal error LNK1120: 11 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

如何解决?

由于

2 个答案:

答案 0 :(得分:1)

  1. 如果从Visual Studio控制台输出中收到LNK2019错误,您可以在64位Windows上为Win32平台构建项目,尝试切换到x64。

    如果您正在使用Visual Studio GO TO - > Build - > (那就是你改变或创建win32 / x64的地方  配置管理器enter image description here

答案 1 :(得分:0)

您确定您的应用程序是否与相应的库链接? 在OpenNI和Nite安装的某个地方,必须有一个包含.lib文件的文件夹。您必须在项目属性页的其他库目录中指定此路径。如果它之后仍然无法工作,您应该在其他依赖项中添加这些库的名称。