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. How to debug and get the source of signal and slots linking error's
Forum Updated to NodeBB v4.3 + New Features

How to debug and get the source of signal and slots linking error's

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 3.3k 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.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    Hi sometimes when i change large code base written in Qt , after compilnig it im getting linking errors that talking about something wrong in "metaObject" but i have no idea what is the source of the problem , how can i get more info from this error :
    @1>Linking...
    1>TestDialog.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall TestDialog::metaObject(void)const " (?metaObject@TestDialog@@UBEPBUQMetaObject@@XZ)
    1>TestDialog.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall TestDialog::qt_metacast(char const *)" (?qt_metacast@TestDialog@@UAEPAXPBD@Z)
    1>TestDialog.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TestDialog::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@TestDialog@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
    1>TestDialog.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const TestDialog::staticMetaObject" (?staticMetaObject@TestDialog@@2UQMetaObject@@B)
    1>debug\TestApp.exe : fatal error LNK1120: 4 unresolved externals@

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      Your header isn't moc'ed. The VS plug-in probably didn't detect the Q_OBJECT macro properly. Remove, add, rebuild.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dbzhang800
        wrote on last edited by
        #3

        if your use qmake, please run it again.

        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