0

I have installed LibUSB, but I still can't set it into Qt Creator.

Following is my .pro file.

#-------------------------------------------------
#
# Project created by Qt Creator 2013-05-08T20:27:36
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = USB
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp


include(3rdparty/qextserialport-1.2rc/src/qextserialport.pri)
INCLUDEPATH += C:/Users/yohan/Documents/LibUSB/libusb-win32-bin-1.2.6.0/include
LIBS += C:/Users/yohan/Documents/LibUSB/libusb-win32-bin-1.2.6.0/lib/msvc/libusb.lib

This is my Qt Creator data:

Enter image description here

Still, the IDE is not detecting libusb.h.

Why is this happening?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
PeakGen
  • 21,894
  • 86
  • 261
  • 463
  • Anyway, are you sure that C:/Users/yohan/Documents/LibUSB/libusb-win32-bin-1.2.6.0/include/libusb.h exists? This is a serious question, paste it in a file browser, I've had this error a few times where I had just typed the wrong path. Just type `#include "C:/Users/yohan/Documents/LibUSB/libusb-win32-bin-1.2.6.0/include/libusb.h"` in your source file, and see if you get a compile error. – sashoalm May 09 '13 at 06:59
  • 1
    what do you mean by "the IDE is not detecting libusb.h". Does it mean the compiler can't find it? Or does the editor just mark it as missing? Check if you got possible subdirectories right. Here on linux, libusb.h is not in include/ directly, but in a subfolder (/usr/include/libusb-1.0/libusb.h) – Frank Osterfeld May 09 '13 at 08:07
  • possible duplicate of [USB Programming with Qt](http://stackoverflow.com/questions/16450160/usb-programming-with-qt) – Nicholas Wilson May 09 '13 at 12:53

0 Answers0