我一直在尝试将 OpenNI 和 NiTE 与 Qt 一起使用,但出现此错误:
C:\Users\User\Google Drive\Projects\Qt-Projects\untitled\mainwindow.cpp:3: error: C1083: Cannot open include file: 'OpenNI2/Include/OpenNI.h': No such file or directory
NiTE 也是如此。我已经使用 Qt Creator 的添加库接口添加了库,并检查了是否存在环境变量。这是我的 .pro 文件:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../OpenNI2/Lib/ - lOpenNI2
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../OpenNI2/Lib/ -lOpenNI2d
INCLUDEPATH += $$PWD/../../../../../../OpenNI2/Include/
DEPENDPATH += $$PWD/../../../../../../OpenNI2/Include/
win32:CONFIG(release, debug|release): LIBS += - L$$PWD/../../../../../../PrimeSense/NiTE2/Lib/ -lNiTE2
else:win32:CONFIG(debug, debug|release): LIBS += - L$$PWD/../../../../../../PrimeSense/NiTE2/Lib/ -lNiTE2d
INCLUDEPATH += $$PWD/../../../../../../PrimeSense/NiTE2/Include/
DEPENDPATH += $$PWD/../../../../../../PrimeSense/NiTE2/Include/