我在 Ubuntu 16.04 上安装了 libfreenect。然后当我在 Qt 中添加它的库时,出现以下错误。
我尝试添加 libusb-1.0。我在终端输入了这个:
pkg-config libusb-1.0 --libs --cflags -I/usr/include/libusb-1.0 -lusb-1.0
.pro 文件:
QT += 核心 QT -= gui
配置 += c++11
目标 = 1 配置 += 控制台配置 -= app_bundle
模板 = 应用程序
来源 += main.cpp
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/local /lib/release/ -lfreenect_sync else:win32:CONFIG(debug, debug|release ): LIBS += -L$$PWD/../../../usr/local/lib/debug/ -lfreenect_sync else:unix: LIBS += -L$$PWD/../../。 ./usr/local/lib/ -lfreenect_sync
INCLUDEPATH += $$PWD/../../../usr/local/include DEPENDPATH += $$PWD/../../../usr/local/include
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/release/libfreenect_sync.a else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/debug/libfreenect_sync.a else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/release/freenect_sync.lib else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$ PWD/../../../usr/local/lib/debug/freenect_sync.lib else:unix: PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/libfreenect_sync。一个
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/local/lib/release/ -lfreenect_sync else:win32:CONFIG(debug, debug|release ): LIBS += -L$$PWD/../../../usr/local/lib/debug/ -lfreenect_sync else:unix: LIBS += -L$$PWD/../../。 ./usr/local/lib/ -lfreenect_sync
INCLUDEPATH += $$PWD/../../../usr/local/include DEPENDPATH += $$PWD/../../../usr/local/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/local
/lib/release/ -lfreenect else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../usr/local/lib/debug/ -lfreenect else: unix:LIBS += -L$$PWD/../../../usr/local/lib/ -lfreenect
INCLUDEPATH += $$PWD/../../../usr/local/include DEPENDPATH += $$PWD/../../../usr/local/include
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/release/libfreenect.a else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/debug/libfreenect.a else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/release/freenect.lib else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$ PWD/../../../usr/local/lib/debug/freenect.lib else:unix: PRE_TARGETDEPS += $$PWD/../../../usr/local/lib/libfreenect.一个
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/local/lib/release/ -lfreenect else:win32:CONFIG(debug, debug|release ): LIBS += -L$$PWD/../../../usr/local/lib/debug/ -lfreenect else:unix: LIBS += -L$$PWD/../../。 ./usr/local/lib/ -lfreenect
INCLUDEPATH += $$PWD/../../../usr/local/include DEPENDPATH += $$PWD/../../../usr/local/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/lib/release/ -lusb-1.0 else:win32:CONFIG(debug, debug|release ): LIBS += -L$$PWD/../../../usr/lib/debug/ -lusb-1.0 else:unix: LIBS += -L$$PWD/../../。 ./usr/lib/ -lusb-1.0
INCLUDEPATH += $$PWD/../../../usr/include DEPENDPATH += $$PWD/../../../usr/include
但同样的错误再次发生。我该如何解决?