Results 1 to 3 of 3

Thread: unresolved external symbol

  1. #1
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default unresolved external symbol

    1>dcomboboxplugin.obj : error LNK2019: unresolved external symbol "public: static struct QMetaObject const DComboBox::staticMetaObject" (?staticMetaObject@DComboBox@@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl DComboBox::tr(char const *,char const *)" (?tr@DComboBox@@SA?AVQString@@PBD0@Z)

    I built a class that inherits qcombobox so that I could add some extra functionality to it.. The new class compiles and links fine but when I try to link the designer plugin for it I get the above message.. Any ideas?

    I attached the programs to the post..
    Attached Files Attached Files
    Last edited by tgreaves; 8th January 2009 at 19:40.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: unresolved external symbol

    Please attach .pro files next time. Those .vcproj files are unusable for non-VS users.
    J-P Nurmi

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: unresolved external symbol

    From what I can interpret the .vcproj files, looks like both projects are defining QDESIGNER_EXPORT_WIDGETS. Only the dcombobox library project is supposed to export, the other one (the plugin who uses the library) is supposed to import. So don't define QDESIGNER_EXPORT_WIDGETS in the plugin project.
    J-P Nurmi

Similar Threads

  1. shared vs static
    By alisami in forum Installation and Deployment
    Replies: 3
    Last Post: 4th October 2008, 13:04
  2. Link errors when linking chained libraries on windows
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2008, 14:52
  3. Replies: 16
    Last Post: 23rd May 2008, 10:12
  4. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 16:06
  5. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04

Tags for this Thread

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.