Using libusb with QT Creator in Windows
Ok, so I'm having some problems linking the library into my project for QT creator Windows.
Here is the contents of my .pro file:
#-------------------------------------------------
#
# Project created by QtCreator 2014-08-04T09:44:21
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = usb_hid_api
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h\
FORMS += mainwindow.ui
CONFIG += console
unix|win32: LIBS += -L$$PWD/../libusb_win/MinGW64/static/ -lusb-1.0
INCLUDEPATH += $$PWD/../libusb_win/include/libusbx-1.0
DEPENDPATH += $$PWD/../libusb_win/include/libusbx-1.0
I get as a result of my problems:
undefined reference to 'libusb_error_name@4' line 16
undefined reference to 'libusb_init@4' line 32
etc...
(basically a bunch of undefined references).
Can someone tell me where I'm going wrong?
Re: Using libusb with QT Creator in Windows
The library is not where you think it is or the static library is not called libusb-1.0.a.