Error CAN Bus example implementation in QtCreator 4.14.1 Based on Qt 5.15.2
-
wrote on 28 Jul 2022, 11:21 last edited by imene
I'm trying to implement this project in QtCreator (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can?h=5.15.2)
OS: Raspbian GNU/Linux 11 (bullseye) [linux version 5.15.53-v7+]
Qt Creator 4.14.1
Based on Qt 5.15.2 (GCC 10.2.1 20210110, 32 bit)But i face many errors:
I create new project then i added classes and .qrc file,
i only change can.pro file to addapte it to my project from this(code in the website):
To this:(i only added line 4 and 5 "QT += serialbus widgets
requires(qtConfig(combobox))" to can.pro in my new project)
-
I'm trying to implement this project in QtCreator (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can?h=5.15.2)
OS: Raspbian GNU/Linux 11 (bullseye) [linux version 5.15.53-v7+]
Qt Creator 4.14.1
Based on Qt 5.15.2 (GCC 10.2.1 20210110, 32 bit)But i face many errors:
I create new project then i added classes and .qrc file,
i only change can.pro file to addapte it to my project from this(code in the website):
To this:(i only added line 4 and 5 "QT += serialbus widgets
requires(qtConfig(combobox))" to can.pro in my new project)
@imene Please show the content of the main.cpp file.
And also the whole build log would be helpful. -
wrote on 28 Jul 2022, 11:47 last edited by imene
Hi @jsulm i take the same code main.cpp from this site (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can?h=5.15.2),
-
Hi @jsulm i take the same code main.cpp from this site (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can?h=5.15.2),
@imene Try a complete rebuild:
- Delete build folder
- Run qmake
- Build
-
Okay @jsulm, i get this:
Did i have to delete bitratebox.ui ? because it doesn't exist here(in the site):
@imene Errors are self explanatory: the class name seems to be bitratebox, not BitRateBox (check bitratebox.h).
-
@imene So, as you can clearly see the name of the class is bitratebox...
-
wrote on 28 Jul 2022, 12:41 last edited by
@imene
Where your bitratebox.h file comes from ?Here the file from the git:
https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can/bitratebox.h?h=5.15.2Abviously not the right one !
6/10