2014-03-28 53 views
0

我從未見過LNK 2019之前的錯誤,現在我遇到它時,我嘗試鏈接我從Nite獲得的代碼。LNK2019錯誤使用Nite和OpenNI

的錯誤是...

1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteShutdownHandTracker referenced in function "public: void __thiscall nite::HandTracker::destroy(void)" ([email protected]@[email protected]@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 *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteReadHandTrackerFrame referenced in function "public: enum nite::Status __thiscall nite::HandTracker::readFrame(class nite::HandTrackerFrameRef *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z) 
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteHandTrackerFrameRelease referenced in function "public: void __thiscall nite::HandTrackerFrameRef::release(void)" ([email protected]@[email protected]@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)" ([email protected]@[email protected]@[email protected]@[email protected]@@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 ========== 

如何解決呢?

謝謝

回答

0

您確定您的應用程序正在鏈接到相應的庫嗎? 在您的OpenNI和Nite安裝中,必須有一個包含.lib文件的文件夾。您必須在項目屬性頁面的其他庫目錄中指定此路徑。如果它以後仍然不起作用,則應該將這些庫的名稱添加到其他依賴項中。

1
  1. 如果您從Visual Studio控制檯輸出得到錯誤LNK2019,你可能會構建針對Win32平臺項目上的64位Windows,試圖swiching到x64。

    如果您正在使用Visual Studio的進入 - >建設 - >(多數民衆贊成在您更改或創建的win32/64 配置管理器enter image description here