Results 1 to 3 of 3

Thread: Using libusb-1.0 with Qt (MinGW) in Windows 8

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Using libusb-1.0 with Qt (MinGW) in Windows 8

    The LIBS variable is usually an -L directive with the directory the library is in and an -l directive with the library name (without any extension of lib prefix)

    So maybe try

    Qt Code:
    1. LIBS += -L C:\Qt\libusb-1.0.20\MinGW32\static -l usb-1.0
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  2. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using libusb-1.0 with Qt (MinGW) in Windows 8

    ... moreover, libusb is a C library. I include in my C++ code (Debian here! Patch to your Windows!):
    Qt Code:
    1. extern "C"
    2. {
    3. #include <libusb-1.0/libusb.h>
    4. }
    To copy to clipboard, switch view to plain text mode 
    most likely, replace "libusb-1.0" with "libusb-1.0.20" and remove the INCLUDEPATH addition. Moreover, in Debian, accessing a USB device needs root privileges so that bye bye debugger.

Similar Threads

  1. g++ on Windows (mingw-w64)
    By mdavidjohnson in forum Newbie
    Replies: 1
    Last Post: 14th April 2016, 16:48
  2. Linux, libusb and Qt
    By jacaz4 in forum Newbie
    Replies: 8
    Last Post: 30th July 2015, 08:27
  3. Using libusb with QT Creator in Windows
    By dching in forum Newbie
    Replies: 1
    Last Post: 5th August 2014, 21:37
  4. Windows 7 + Qt + mingw 64-bit
    By serge_malo in forum Newbie
    Replies: 0
    Last Post: 30th September 2010, 12:59
  5. QT 4.2.2 Windows Mingw
    By KaptainKarl in forum Installation and Deployment
    Replies: 3
    Last Post: 4th May 2007, 14:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.