Currently I am making a project on recognizing human actions using Kinect. Since I work in Ubuntu and I need the skeleton information, I choose openNI and NITE. I want to use Qt to create a GUI application, but I don't know how to integrate openNI in Qt. All the samples of openNI and NITE run well, but I failed to build any of them in Qt creator. I really hope anyone can help me on this(Say how to build NiUserTracker in Qt creator). I will also apriciate it if anyone can give some sample Qt projects.
I have tried to build NiUserTracker in Qt creator: Content of .pro file:
TEMPLATE = app
CONFIG += console
CONFIG -= qt
INCLUDEPATH += /home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Include
SOURCES += main.cpp \
SceneDrawer.cpp \
opengles.cpp
HEADERS += \
SceneDrawer.h \
opengles.h
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/release/ -lnimCodecs
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/debug/ -lnimCodecs
else:symbian: LIBS += -lnimCodecs
else:unix: LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/ -lnimCodecs
INCLUDEPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
DEPENDPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/release/ -lnimMockNodes
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/debug/ -lnimMockNodes
else:symbian: LIBS += -lnimMockNodes
else:unix: LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/ -lnimMockNodes
INCLUDEPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
DEPENDPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/release/ -lnimRecorder
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/debug/ -lnimRecorder
else:symbian: LIBS += -lnimRecorder
else:unix: LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/ -lnimRecorder
INCLUDEPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
DEPENDPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/release/ -lOpenNI
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/debug/ -lOpenNI
else:symbian: LIBS += -lOpenNI
else:unix: LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/ -lOpenNI
INCLUDEPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
DEPENDPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/release/ -lOpenNI
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/debug/ -lOpenNI
else:symbian: LIBS += -lOpenNI
else:unix: LIBS += -L$$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib/ -lOpenNI
INCLUDEPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
DEPENDPATH += $$PWD/../../../../../../../../../../home/myname/Kinect/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0/Lib
I have added the inlcude path of openNI and libs, however when I built the program, it shows:
SceneDrawer.o: In function `initTexture(void**, int&, int&)':
SceneDrawer.cpp:(.text+0x45): undefined reference to `glGenTextures'
SceneDrawer.cpp:(.text+0x9c): undefined reference to `glBindTexture'
SceneDrawer.cpp:(.text+0xb8): undefined reference to `glTexParameteri'
SceneDrawer.cpp:(.text+0xd4): undefined reference to `glTexParameteri'
SceneDrawer.o: In function `DrawRectangle(float, float, float, float)':
SceneDrawer.cpp:(.text+0x144): undefined reference to `glVertexPointer'
SceneDrawer.cpp:(.text+0x160): undefined reference to `glDrawArrays'
SceneDrawer.cpp:(.text+0x165): undefined reference to `glFlush'
SceneDrawer.o: In function `DrawTexture(float, float, float, float)':
SceneDrawer.cpp:(.text+0x19b): undefined reference to `glEnableClientState'
SceneDrawer.cpp:(.text+0x1bf): undefined reference to `glTexCoordPointer'
SceneDrawer.o: In function `glPrintString(void*, char*)':
SceneDrawer.cpp:(.text+0x22f): undefined reference to `glutBitmapCharacter'
SceneDrawer.o: In function `DrawLimb(unsigned int, XnSkeletonJoint, XnSkeletonJoint)':
SceneDrawer.cpp:(.text+0x24c): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x306): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x3da): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x488): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x5ab): undefined reference to `g_DepthGenerator'
SceneDrawer.cpp:(.text+0x5ef): undefined reference to `glVertex3i'
SceneDrawer.cpp:(.text+0x62b): undefined reference to `glVertex3i'
SceneDrawer.cpp:(.text+0x65a): undefined reference to `g_UserGenerator'
SceneDrawer.o: In function `drawCircle(float, float, float)':
SceneDrawer.cpp:(.text+0x7e0): undefined reference to `glBegin'
SceneDrawer.cpp:(.text+0x841): undefined reference to `glVertex2f'
SceneDrawer.o: In function `DrawJoint(unsigned int, XnSkeletonJoint)':
SceneDrawer.cpp:(.text+0x869): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x91d): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x9d2): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0xabf): undefined reference to `g_DepthGenerator'
SceneDrawer.o: In function `DrawDepthMap(xn::DepthMetaData const&, xn::SceneMetaData const&)':
SceneDrawer.cpp:(.text+0xdb7): undefined reference to `g_bDrawPixels'
SceneDrawer.cpp:(.text+0xf0c): undefined reference to `g_bDrawBackground'
SceneDrawer.cpp:(.text+0xf85): undefined reference to `glBindTexture'
SceneDrawer.cpp:(.text+0xfd4): undefined reference to `glTexImage2D'
SceneDrawer.cpp:(.text+0xff8): undefined reference to `glColor4f'
SceneDrawer.cpp:(.text+0x1004): undefined reference to `glEnable'
SceneDrawer.cpp:(.text+0x1052): undefined reference to `glDisable'
SceneDrawer.cpp:(.text+0x108f): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x10d1): undefined reference to `g_bDrawSkeleton'
SceneDrawer.cpp:(.text+0x10f4): undefined reference to `g_bPrintID'
SceneDrawer.cpp:(.text+0x1107): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x1114): undefined reference to `g_DepthGenerator'
SceneDrawer.cpp:(.text+0x115b): undefined reference to `g_bPrintState'
SceneDrawer.cpp:(.text+0x11d6): undefined reference to `glColor4f'
SceneDrawer.cpp:(.text+0x1210): undefined reference to `glRasterPos2i'
SceneDrawer.cpp:(.text+0x121b): undefined reference to `glutBitmapHelvetica18'
SceneDrawer.cpp:(.text+0x1225): undefined reference to `g_bDrawSkeleton'
SceneDrawer.cpp:(.text+0x1233): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x1348): undefined reference to `glColor4f'
SceneDrawer.cpp:(.text+0x134e): undefined reference to `g_bMarkJoints'
SceneDrawer.cpp:(.text+0x1362): undefined reference to `glBegin'
SceneDrawer.cpp:(.text+0x154b): undefined reference to `glEnd'
SceneDrawer.cpp:(.text+0x155a): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x187a): undefined reference to `g_UserGenerator'
SceneDrawer.cpp:(.text+0x1b02): undefined reference to `g_bPrintFrameID'
SceneDrawer.cpp:(.text+0x1b87): undefined reference to `glColor4f'
SceneDrawer.cpp:(.text+0x1b9b): undefined reference to `glRasterPos2i'
SceneDrawer.cpp:(.text+0x1baa): undefined reference to `glutBitmapHelvetica18'
SceneDrawer.o: In function `DrawTexture(float, float, float, float)':
SceneDrawer.cpp:(.text+0x1f3): undefined reference to `glDisableClientState'
SceneDrawer.o: In function `drawCircle(float, float, float)':
SceneDrawer.cpp:(.text+0x854): undefined reference to `glEnd'
collect2: ld returned 1 exit status
I guess it is because the glut libs are not included. However both libs are .lib files, which seems cannot be added in Qt creator....
Thank you very much!