PDA

View Full Version : unresolved external symbol



tgreaves
8th January 2009, 19:30
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..

jpn
16th January 2009, 19:33
Please attach .pro files next time. Those .vcproj files are unusable for non-VS users.

jpn
16th January 2009, 19:49
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.