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. Linking error
Qt 6.11 is out! See what's new in the release blog

Linking error

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 2.8k Views 1 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.
  • K Offline
    K Offline
    Knubbe
    wrote on last edited by
    #1

    Hey, im having a nightmare, im learning to use QT and i've to use mysql in my application, so i got the mysql c++ connector following this guide https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-apps-windows-visual-studio.html, so i realized that QT has one already, then i had to remove it, and now i get tons of errors compiling :(

    theres some of these annoying errors

    1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual int __cdecl QTableView::horizontalOffset(void)const " (?horizontalOffset@QTableView@@MEBAHXZ)
    1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QTableView::horizontalScrollbarAction(int)" (?horizontalScrollbarAction@QTableView@@MEAAXH@Z)
    1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QAbstractItemView::horizontalScrollbarValueChanged(int)" (?horizontalScrollbarValueChanged@QAbstractItemView@@MEAAXH@Z)
    1>FacNo.obj : error LNK2001: unresolved external symbol "public: virtual class QModelIndex __cdecl QTableView::indexAt(class QPoint const &)const " (?indexAt@QTableView@@UEBA?AVQModelIndex@@AEBVQPoint@@@Z)
    1>FacNo.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QAbstractItemView::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent@QAbstractItemView@@MEAAXPEAVQInputMethodEvent@@@Z)

    I think that its something about the linker, but i dont know how to fix it :( thank you in advance, and sorry for my mediocre english

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What did you remove exactly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Knubbe
        wrote on last edited by
        #3

        libmysql.lib from linker->general
        mysqlcppconn-static.lib and libmysql.lib from linker->Additional Dependences
        CPPCONN_PUBLIC_FUNC= from C++->Preprocessor Definitions

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Strange, it looks completely unrelated to your problem.

          Did you do a full rebuild of the project ?

          Am I right that are you using Visual Studio to build your app rather than Qt Creator ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Knubbe
            wrote on last edited by
            #5

            Yes i did a full rebuild and yes, im using VS :)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you create the project directly in VS or do you have a .pro file ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Knubbe
                wrote on last edited by
                #7

                It was created directly in VS and everything worked fine til i removed the C++ connector

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Then check whether there's not the widget module missing in your linker flags.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    Knubbe
                    wrote on last edited by
                    #9

                    Ok, ill try to get some info because i have no idea how to do that

                    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