Hello!
I try to connect device (STM32-Nucleo) with PC via USB.
I have downloaded Qt-5.7.0 with MinGW-5.3.0 and libusb-1.0.20.

(folders of libusb-1.0.20)
Qt Code:
  1. libusb-1.0.20
  2. examples
  3. include
  4. libusb-1.0
  5. libusb.h
  6. MinGW32
  7. dll
  8. libusb-1.0.dll
  9. libusb-1.0.dll.a
  10. static
  11. libusb-1.0.a
  12. MinGW64
  13. MS32
  14. MS64
  15. libusb-1.0.def
  16. README.txt
To copy to clipboard, switch view to plain text mode 

1. I have created an empty project
2. added to .pro
Qt Code:
  1. INCLUDEPATH += C:\Qt\libusb-1.0.20\include\libusb-1.0\
  2. LIBS += C:\Qt\libusb-1.0.20\MinGW32\static\libusb-1.0.a
To copy to clipboard, switch view to plain text mode 

3. added to main.cpp
Qt Code:
  1. #include <libusb.h>
To copy to clipboard, switch view to plain text mode 
(then autosubstitution showed functions from libusb)

4. added call of libusb_init(NULL);
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. libusb_init(NULL);
  4.  
  5. QApplication a(argc, argv);
  6. MainWindow w;
  7. w.show();
  8.  
  9. return a.exec();
  10. }
To copy to clipboard, switch view to plain text mode 


But. There is an error
In function `Z5qMainiPPc':
undefined reference to `libusb_init@4'

Can someone tell me where I'm going wrong?