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. undefined reference to `vtable for
Qt 6.11 is out! See what's new in the release blog

undefined reference to `vtable for

Scheduled Pinned Locked Moved Unsolved General and Desktop
39 Posts 5 Posters 6.0k Views 2 Watching
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1
    This post is deleted!
    J.HilkJ 2 Replies Last reply
    0
    • SPlattenS SPlatten

      This post is deleted!

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @SPlatten

      QString tolerance() {return m_tolerance; }

      is missing


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      SPlattenS 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @SPlatten

        QString tolerance() {return m_tolerance; }

        is missing

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by SPlatten
        #3
        This post is deleted!
        JonBJ 1 Reply Last reply
        0
        • SPlattenS SPlatten

          This post is deleted!

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @SPlatten
          Well, I know nothing about QML or properties or whatever, only about C++, but where do you define storage for (not declare) the static uint16_t m_nextUDN;? If that is missing could it lead to the error? BTW, your topic title does not actually tell us what the full error is....

          SPlattenS 1 Reply Last reply
          0
          • JonBJ JonB

            @SPlatten
            Well, I know nothing about QML or properties or whatever, only about C++, but where do you define storage for (not declare) the static uint16_t m_nextUDN;? If that is missing could it lead to the error? BTW, your topic title does not actually tell us what the full error is....

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5
            This post is deleted!
            SPlattenS JonBJ 2 Replies Last reply
            1
            • SPlattenS SPlatten

              This post is deleted!

              SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by SPlatten
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • SPlattenS SPlatten

                This post is deleted!

                JonBJ Online
                JonBJ Online
                JonB
                wrote on last edited by JonB
                #7

                @SPlatten
                OK for the definition! [I'm about to post a question in the C++ Gurus sub-forum about this :) ]

                the message is just name space and class name

                But are we to assume that is the (correct) namespace & class name specifically for staledata_t?

                I think between you, you have solved the issue

                However, that appears to not be all, the same message is still reported.

                Are these two statements meant to be consistent?

                SPlattenS 1 Reply Last reply
                0
                • JonBJ JonB

                  @SPlatten
                  OK for the definition! [I'm about to post a question in the C++ Gurus sub-forum about this :) ]

                  the message is just name space and class name

                  But are we to assume that is the (correct) namespace & class name specifically for staledata_t?

                  I think between you, you have solved the issue

                  However, that appears to not be all, the same message is still reported.

                  Are these two statements meant to be consistent?

                  SPlattenS Offline
                  SPlattenS Offline
                  SPlatten
                  wrote on last edited by
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • SPlattenS SPlatten

                    This post is deleted!

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #9

                    @SPlatten said in undefined reference to `vtable for:

                    const QString ip() { return m_ip; }

                    btw, the const here has no meaning. I think you meant to write:

                     QString ip() const { return m_ip; }
                    

                    or

                    const QString &ip() { return m_ip; }
                    

                    or

                    const QString &ip() const { return m_ip; }
                    

                    ;-)


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    SPlattenS 1 Reply Last reply
                    0
                    • J.HilkJ J.Hilk

                      @SPlatten said in undefined reference to `vtable for:

                      const QString ip() { return m_ip; }

                      btw, the const here has no meaning. I think you meant to write:

                       QString ip() const { return m_ip; }
                      

                      or

                      const QString &ip() { return m_ip; }
                      

                      or

                      const QString &ip() const { return m_ip; }
                      

                      ;-)

                      SPlattenS Offline
                      SPlattenS Offline
                      SPlatten
                      wrote on last edited by
                      #10
                      This post is deleted!
                      J.HilkJ 1 Reply Last reply
                      0
                      • JoeCFDJ Offline
                        JoeCFDJ Offline
                        JoeCFD
                        wrote on last edited by JoeCFD
                        #11

                        In this case, often you need to make clean and rebuild your project.
                        in cmake: remove build fold completely. rebuild everything
                        in qmake: make distclean. then rebuild.

                        SPlattenS 1 Reply Last reply
                        1
                        • JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on last edited by
                          #12
                          This post is deleted!
                          1 Reply Last reply
                          0
                          • SPlattenS SPlatten

                            This post is deleted!

                            J.HilkJ Offline
                            J.HilkJ Offline
                            J.Hilk
                            Moderators
                            wrote on last edited by
                            #13

                            @SPlatten sooo, what exactly is at line 47 ?


                            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                            Q: What's that?
                            A: It's blue light.
                            Q: What does it do?
                            A: It turns blue.

                            SPlattenS 1 Reply Last reply
                            1
                            • JoeCFDJ JoeCFD

                              In this case, often you need to make clean and rebuild your project.
                              in cmake: remove build fold completely. rebuild everything
                              in qmake: make distclean. then rebuild.

                              SPlattenS Offline
                              SPlattenS Offline
                              SPlatten
                              wrote on last edited by
                              #14
                              This post is deleted!
                              1 Reply Last reply
                              1
                              • J.HilkJ J.Hilk

                                @SPlatten sooo, what exactly is at line 47 ?

                                SPlattenS Offline
                                SPlattenS Offline
                                SPlatten
                                wrote on last edited by
                                #15
                                This post is deleted!
                                JonBJ 1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  This post is deleted!

                                  JonBJ Online
                                  JonBJ Online
                                  JonB
                                  wrote on last edited by
                                  #16

                                  @SPlatten
                                  To be clear: you mean that the file you have been showing us is the config.H file of the error message? And the implementation file is config.cpp which is compiled to config.o. And the line #47

                                  staledata_t() : QObject(nullptr)
                                  

                                  is the one just under the public: you show earlier?

                                  SPlattenS 1 Reply Last reply
                                  0
                                  • SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by
                                    #17
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • JonBJ JonB

                                      @SPlatten
                                      To be clear: you mean that the file you have been showing us is the config.H file of the error message? And the implementation file is config.cpp which is compiled to config.o. And the line #47

                                      staledata_t() : QObject(nullptr)
                                      

                                      is the one just under the public: you show earlier?

                                      SPlattenS Offline
                                      SPlattenS Offline
                                      SPlatten
                                      wrote on last edited by
                                      #18
                                      This post is deleted!
                                      JonBJ J.HilkJ JoeCFDJ 3 Replies Last reply
                                      0
                                      • SPlattenS SPlatten

                                        This post is deleted!

                                        JonBJ Online
                                        JonBJ Online
                                        JonB
                                        wrote on last edited by
                                        #19

                                        @SPlatten
                                        Dunno at this point, a bit difficult to spot with all that's going on. For me I would do the usual: comment "everything" out, preferably including the namespaces, till you get rid of that message. Then add back in....

                                        1 Reply Last reply
                                        0
                                        • SPlattenS SPlatten

                                          This post is deleted!

                                          J.HilkJ Offline
                                          J.HilkJ Offline
                                          J.Hilk
                                          Moderators
                                          wrote on last edited by
                                          #20

                                          @SPlatten your class compiles perfectly fine for me, at least as long as I add the implementation of m_nextUDN, where exactly do you do that ?

                                          I know you said/showed, you do it, but where exactly?


                                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                          Q: What's that?
                                          A: It's blue light.
                                          Q: What does it do?
                                          A: It turns blue.

                                          SPlattenS 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