2
votes

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\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?

1
Better late than never: I ran into the same errors today trying to combine Qt and OpenNI using MinGW in eclipse. It seems like you also use MinGW, right (as needed for Qt)? Unfortunately, OpenNI does not support MinGW. Hope that does help you. - SoJeN

1 Answers

0
votes

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