C ++和Open NI,未解析的外部

时间:2017-10-11 08:40:41

标签: c++ visual-studio-2017 openni

我正在使用Kinect Xbox 360和Open NI框架开展项目。我写了一个简单的代码来打印Open NI版本,但它给出了我下面显示的错误。 任何帮助?我正在使用Visual Studio 2017和Open NI 2

代码:

#include "OpenNI.h"
#include<iostream>
using namespace std;


void main() {
    openni::OpenNI::initialize();
    openni::Version a = openni::OpenNI::getVersion();
    cout << a.build;
 }

错误:

1>Source.cpp
1>Source.obj : error LNK2019: unresolved external symbol 
__imp__oniInitialize referenced in function "public: static enum 
openni::Status __cdecl openni::OpenNI::initialize(void)" (?
initialize@OpenNI@openni@@SA?AW4Status@2@XZ)
1>Source.obj : error LNK2019: unresolved external symbol 
__imp__oniGetVersion referenced in function "public: static struct 
openni::Version __cdecl openni::OpenNI::getVersion(void)" (?
getVersion@OpenNI@openni@@SA?AUVersion@2@XZ)

0 个答案:

没有答案