Unsolved USB for QT (QtUsb). How to make Qt use the lib?
-
I installed QtUSB on my Ubuntu 20.04 (from https://github.com/fpoussin/QtUsb):
sudo add-apt-repository ppa:fpoussin/ppa
sudo apt install libqt5usb5 libqt5usb5-devBut my Qt Creator (4.11.0) still reports "Unknown module(s) in QT: usb".
Do I have to tell the QTCreator something like a searchpath?Cheers,
Uwe -
@UweA What Qt do you use? You installed QtUSB for Qt provided by your distribution - do you use that Qt version?
-
@UweA
As per the examples at your link, did you addQT += core usb
into your.pro
file? -
@jsulm I'm using Qt Creator 4.11.0(Based on Qt 5.14.0) Is this the right version?
-
@UweA said in USB for QT (QtUsb). How to make Qt use the lib?:
Is this the right version?
No. This is the Qt version which was used to build QtCreator and is completely irrelevant.
Please check the Kit you're using: which Qt version is used there? Post the path to qmake configured in that Qt version. -
@jsulm
../Qt/5.12.6/gcc_64/bin/qmakeSorry for answering so slowly but I always have to wait 600 seconds until I'm allowed to repost because I'm a new user.
-
@UweA So, you're using another Qt version (I guess you installed it using online/offline installer?).
But you installed QtUSB for Qt delivered by your distribution. Either use Qt delivered by your distribution or build QtUSB by yourself using qmake from your own Qt version. -
@jsulm I compiled my own QtUSB version now. Thank you so far!
But what is to do next? How do I tell Qt to use it? (And which file? Is it "libQt5Usb.so"?)
-
@UweA
I wrote earlier:As per the examples at your link, did you add
QT += core usb
into your .pro file?Is that relevant to you?
-
@JonB Yes, it's in the -pro file.
Otherwise Qt wouldn't complain about a usb lib that it cannot find. -
@UweA Did you also run "make install" after building? That should be all you have to do...
-
@jsulm Yes, I did and I made a little step forward.
The linker is satisfied now but I have problems with using QtUSB.
The compiler complains about a missing header file ("QUsbInfo").
It looks like that it is missing from the repository. I raised an issue on github.