开发者

Setting up OpenNI + Kinect with QtCreator

开发者 https://www.devze.com 2023-03-09 16:02 出处:网络
I\'m trying to get started with Kinect programming together with Qt. Sample Code for Visual Studio 2008 works and compiles on my system. I tried to add the Include paths and libraries to the pro file:

I'm trying to get started with Kinect programming together with Qt. Sample Code for Visual Studio 2008 works and compiles on my system. I tried to add the Include paths and libraries to the pro file:

LIBS += C:\kinect\开发者_StackOverflow中文版openni\Lib\openNI.lib
INCLUDEPATH += C:\kinect\openni\Include

But this gives me around 40 errors like:

error: #error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions below 2003 (7.0) are not supported!

error: macro "XN_VALIDATE_NEW" passed 4 arguments, but takes just 2

error: crtdbg.h: No such file or directory
In file included from c:\kinect\openni\Include/XnOpenNI.h:28

...

Does anyone know what to include or do to combine OpenNI with Qt?


Try using relative paths, for example from the NiSimpleViewer sample:

INCLUDEPATH += .                 #GL,glh path
INCLUDEPATH += ../../Include     #OpenNI path
LIBS += ./Libs/glut32.lib
LIBS += ../../Lib/openNI.lib
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号