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. Public static struct QMetaObject error
Forum Updated to NodeBB v4.3 + New Features

Public static struct QMetaObject error

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.0k 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.
  • D Offline
    D Offline
    Debjani
    wrote on last edited by
    #1

    Hello,
    I am trying to build a program bt it is showing some linking error like this :
    WIN\binary\lib\AIRLook\win_vc10\x64\Debug\WebServicesClientAuthenticator.obj : warning LNK4042: object specified more than once; extras ignored
    2>QTOpenDialog.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QTWorkspaceWindow::staticMetaObject" (?staticMetaObject@QTWorkspaceWindow@@2UQMetaObject@@B)
    2>main\src\Lib64\Debug_Build\Debug\Applications\123D\Na123DUI10.dll : fatal error LNK1120: 1 unresolved externals

    can anyone please tell me how to solve this.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Do a full clean of your project, run qmake and build it again. Probably an outdated moc file.

      (Z(:^

      1 Reply Last reply
      0
      • T Offline
        T Offline
        toptan
        wrote on last edited by
        #3

        Did you forget Q_OBJECT macro in class declaration?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Debjani
          wrote on last edited by
          #4

          Thank you for the reply. But it doesn't work still showing the same error.. :(

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Debjani
            wrote on last edited by
            #5

            toptan @ No i didnt. there is Q_OBJECT in class declaration but still the error is showing.. :(

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Maybe you have forgot to export some method from your library, if it is a library?

              (Z(:^

              1 Reply Last reply
              0
              • hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by
                #7

                Or maybe your class declaration (with the Q_OBJECT) is in a .cpp file and not an .h file?

                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