Issue with QCanBus and project compilation
-
Hello,
I am very new to Qt (in fact never done anything in it) and have an issue.
I received a Qt project which i need to change a little bit, rebuild and deploy. I installed Qt creator and needed libraries but the project won't compile -> the error reads as follows:
/home/exp4/Downloads/virtual robot/virtual_robot-2022-06-24/virtual_robot/robotmessagehandler.h:5: error: QCanBus: No such file or directory In file included from ../virtual_robot/robotmessagehandler.cpp:1: ../virtual_robot/robotmessagehandler.h:5:10: fatal error: QCanBus: No such file or directory 5 | #include <QCanBus> | ^~~~~~~~~
I installed serial bus package (https://debian.pkgs.org/10/debian-main-amd64/libqt5serialbus5-dev_5.11.3-2_amd64.deb.html) but that did not help.I installed Qt from Ubuntu package manager but the project tarball contained a Qt version so I tried to add it to Qt Creator hoping that it'll solve my issue but it says that version is incorrectly installed and i have to run make install on it but I cannot locate proper makefile.
I tried using qmake but with identical results.
Do you have any suggestions on how to compile the project? Qt version - 5.15.2
-
Hi and welcome to devnet,
Do you have the serialbus module added to the
QT
variable in your .pro file ? -
@MMirza said in Issue with QCanBus and project compilation:
I installed serial bus package (https://debian.pkgs.org/10/debian-main-amd64/libqt5serialbus5-dev_5.11.3-2_amd64.deb.html) but that did not help.
Do you have any suggestions on how to compile the project? Qt version - 5.15.2
These two parts of your post indicate that you probably installed the wrong version of the serialbus module. You must use the same version of Qt for all modules.