Results 1 to 13 of 13

Thread: Reg - QMetaObject Error

  1. #1
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Reg - QMetaObject Error

    hai,
    Now i converting Qt3 code into Qt4. While creating dll it gives the following error. I couldn't find where it occurs. The errors are

    Creating library ..\..\bin\plugins\designer/zonetrader.lib and object ..\..\bin\plugins\designer/zonetrader.exp
    moc_zonetrader.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const MyClass::staticMetaObject" (?staticMetaObject@MyClass@@2UQMetaObject@@B)
    ..\..\bin\plugins\designer/zonetrader.dll : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    suresh.
    Last edited by suresh; 4th September 2006 at 21:29.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    Does AFTPluginBase class contain Q_OBJECT macro in its definition?

  3. #3
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    It contains QObject macro.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    Did you run moc on it?

  5. #5
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    Yes, I run it.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    And do you link your application with the code generated by moc for that class?

  7. #7
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    Actually i convert that class into lib file and include my application. Now my application inherit that class.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    Quote Originally Posted by suresh
    Actually i convert that class into lib file and include my application.
    Is AFTPluginBase part of that library? If yes, do you link that library with code generated by moc?

  9. #9
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    Yes, I include in profile. In Qt3 i used the same manner

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    Quote Originally Posted by suresh
    Yes, I include in profile.
    Check your compilation log, not the settings.

    One more thing: Is AFTPluginBase derived from QObject?

  11. #11
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    moc file is automatically generated. How can i link?

  12. #12
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMetaObject Error

    Yes.Its inherited. compilation log means..............

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMetaObject Error

    Quote Originally Posted by suresh
    compilation log means..............
    the exact commands that were executed, not your believes.

Similar Threads

  1. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31
  2. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  3. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  4. Fed up with M$ Window$ !!! Why is Tux leaving me alone???
    By fullmetalcoder in forum General Discussion
    Replies: 35
    Last Post: 18th March 2006, 12:57
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.