Solved QCanBus and Windows 10
-
Hi guys!
I'm currently developping on Windows7 64bits, with Qt5.7 minGW5.3, an application that uses QCanBus with a PEAK system.
Everything works well on this platform, I can choose between several backends such as peakcan or tinycan.I deployed my app on a Windows10 64bits, and here is my issue: no backend are detected! The method
QCanBus::instance()->plugins()
returns an empty list. Of course, my PEAK device works well on this computer, so I'm pretty sure the trouble comes from Qt...I thought that Qt5.8 will maybe help me, but the issue is the same.
Do you have any idea why there are no backend on W10?
Thanks in advance! -
Hi and welcome to devnet,
Did you check whether you had all the dependencies deployed properly ? e.g. also the plugins ?
-
Look on the console output to see what happens.. Maybe your system has not the PCANBasic.dll or mhstcan.dll (also with FTDI for tiny) libraries.
-
Hi everybody! Thank you for your answers!
@SGaist
How can I make sure of that? Are you talking about Qt plugins or system plugin?
I created my installer thanks to Innosetup, so, indeed, I probably forgot something.@kuzulis
The console only says that no backend are detected. It is not the same message as the missing dll message.
On the W7 PC, where everything works ok, there is no need of mhstcan.dll. Do you think W10 would require it? -
On the W7 PC, where everything works ok, there is no need of mhstcan.dll. Do you think W10 would require it?
It is required for the Tiny CAN (also required the FTDI drivers and libraries).
The console only says that no backend are detected.
What is exactly says?
-
I just print the result of
QCanBus::instance()->plugins()
, which returns an empty list.
On W7, I'v got 2 backends on Qt5.7 and a third one in Qt5.8.I'm following this example.
-
I just print the result of QCanBus::instance()->plugins(), which returns an empty list.
This means that you do not have any plugins in <Qt install dir>\plugins\canbus\ ...
-
Use windeployqt on your application to get the dependencies in. If it misses one you can add it as argument on the command line.
-
All right, I used windeployqt, it added the folder "canbus" and it's ok. W10 recognizes 3 backends, as expected.
Thank you very much, mark as resolved!