/usr/include/libfreenect.hpp:33: error: libusb.h: No such file or directory

1k Views Asked by At

I installed libfreenect. I opened QT and began to coding. When I use libfreenect.h no error occurres. But when I use libfreenect.hpp, this error occurred:"error: libusb.h: No such file or directory" contents of .pro file is:

QT += core
QT -= gui

CONFIG += c++11

TARGET = 12moharram
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

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

Where is the problem?

1

There are 1 best solutions below

0
On

Probably libfreenect.h and libfreenect.hpp are themselves including other files, for a reason that I cannot understand libfreenect.hpp is including libusb.h and libfreenect.h is not. Probably libusb.h is not in your INCLUDEPATH.

I would first try to find libusb.h, if it is not present install it (you will probably have to install libusb-dev (debian style). Once you are sure libsub.h is present make sure is in the INCLUDEPATH, in case change the INCLUDEPATH in your .pro file.

This should fix this specific problem but after you fix this there can be more, good luck.