Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error CAN Bus example implementation in QtCreator 4.14.1 Based on Qt 5.15.2

Error CAN Bus example implementation in QtCreator 4.14.1 Based on Qt 5.15.2

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 497 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imene
    wrote on last edited by imene
    #1

    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):


    2462be1b-3cd7-4f72-91ed-ce52ea6b4c83-image.png


    To this:(i only added line 4 and 5 "QT += serialbus widgets
    requires(qtConfig(combobox))" to can.pro in my new project)
    e59fea04-68ce-4f6b-ae53-c4da9c01dcc0-image.png

    be20f541-9ad5-4fe2-b4ec-66f2d102b92e-image.png

    jsulmJ 1 Reply Last reply
    0
    • I 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):


      2462be1b-3cd7-4f72-91ed-ce52ea6b4c83-image.png


      To this:(i only added line 4 and 5 "QT += serialbus widgets
      requires(qtConfig(combobox))" to can.pro in my new project)
      e59fea04-68ce-4f6b-ae53-c4da9c01dcc0-image.png

      be20f541-9ad5-4fe2-b4ec-66f2d102b92e-image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @imene Please show the content of the main.cpp file.
      And also the whole build log would be helpful.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • I Offline
        I Offline
        imene
        wrote on last edited by imene
        #3

        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),
        3d02bc01-b753-41e1-ade2-113c2bf89795-image.png
        0dcf6e01-bd57-4b25-af91-8a2b4cf994fc-image.png

        jsulmJ 1 Reply Last reply
        0
        • I 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),
          3d02bc01-b753-41e1-ade2-113c2bf89795-image.png
          0dcf6e01-bd57-4b25-af91-8a2b4cf994fc-image.png

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @imene Try a complete rebuild:

          • Delete build folder
          • Run qmake
          • Build

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • I Offline
            I Offline
            imene
            wrote on last edited by
            #5

            Okay @jsulm, i get this:
            bbd3cbdd-0d34-48f6-b7ac-cd485bc47b6e-image.png
            Did i have to delete bitratebox.ui ? because it doesn't exist here(in the site):
            b3ce5f0a-d488-4d77-bba3-a31a14324b1e-image.png

            jsulmJ 1 Reply Last reply
            0
            • I imene

              Okay @jsulm, i get this:
              bbd3cbdd-0d34-48f6-b7ac-cd485bc47b6e-image.png
              Did i have to delete bitratebox.ui ? because it doesn't exist here(in the site):
              b3ce5f0a-d488-4d77-bba3-a31a14324b1e-image.png

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @imene Errors are self explanatory: the class name seems to be bitratebox, not BitRateBox (check bitratebox.h).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • I Offline
                I Offline
                imene
                wrote on last edited by
                #7

                @jsulm
                cdc7bd4f-9333-44f8-9240-55ced2398897-image.png

                jsulmJ M 2 Replies Last reply
                0
                • I imene

                  @jsulm
                  cdc7bd4f-9333-44f8-9240-55ced2398897-image.png

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @imene So, as you can clearly see the name of the class is bitratebox...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • I imene

                    @jsulm
                    cdc7bd4f-9333-44f8-9240-55ced2398897-image.png

                    M Offline
                    M Offline
                    mpergand
                    wrote on last edited by
                    #9

                    @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.2

                    Abviously not the right one !

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      imene
                      wrote on last edited by
                      #10

                      Thanks guys @jsulm & @mpergand it works now!
                      i've been using a wrong bitratebox.h bitratebox.cpp files now i take the right ones from the site :
                      8302c81c-001c-483a-9ffe-4c5c7652a342-image.png

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved