
Originally Posted by
serjik
release/main.o:main.cpp

.text+0x304): undefined reference to `_imp___ZN7QGLabel16staticMetaObjectE'
I think the compiler finds the declaration of QGLabel, but the linker can't find the sourcecode of QGLabel, because it does not exists in your prog. But it is logic...
First, you have to create your lib - for example "qglabel". Here you have to export (Q_DECL_EXPORT) your class QGLabel. Perhaps use the template fo QtCreator. This lib you have to use in your QGLabelPlugin.
Use in your *.pro-File of your QGLabelPlugin (I think because of mingw32 different notation in LIBS...):
# where your lib is stored
LIBS += -L"c:/TEST/bin" -lqglabel
# where the header is stored
INCLUDEPATH *= C:/TEST/src
# where your lib is stored
LIBS += -L"c:/TEST/bin" -lqglabel
# where the header is stored
INCLUDEPATH *= C:/TEST/src
To copy to clipboard, switch view to plain text mode
This lib you have to use in your Main-Prog, too, beacuse you want to use the class QGLabel.
Use in your *.pro-File of your Main-Prog:
# where your lib is stored
LIBS += -L"c:/TEST/bin" -lqglabel
# where the header is stored
INCLUDEPATH *= C:/TEST/src
# where your lib is stored
LIBS += -L"c:/TEST/bin" -lqglabel
# where the header is stored
INCLUDEPATH *= C:/TEST/src
To copy to clipboard, switch view to plain text mode
The QUiLoader needs the Plugins of the QtDesigner, too. Because of this, you have to say the QUiLoader where your Plugin is stored.
I hope I could help a little bit.
---------------------------------------------------------------------------------------------------------
EDIT
But the implementation is in the plugin, which is loaded.
That's right. @serjik: Sorry for confusing.
Bookmarks