PDA

View Full Version : Q_export_plugin2



fpujol
20th April 2007, 09:10
Hello,

In my library I'm creating differents plugins for Qt Designer. I have readed about plugins and the examples that comes with qtdemo: "analogclock" plugin. The diference with my lib with the analog clock is that this is one project one plugin and my project is more than one plugin. So I defined Q_EXPORT_PLUGIN2 in diferents classes I have problems compiling the project :

.obj/akfielddateplugin.o: In function `qt_plugin_query_verification_data':
akfielddateplugin.cpp:(.text+0x40): multiple definition of `qt_plugin_query_verification_data'
.obj/akfieldplugin.o:akfieldplugin.cpp:(.text+0x40): first defined here
.obj/akfielddateplugin.o: In function `qt_plugin_instance':
akfielddateplugin.cpp:(.text+0x220): multiple definition of `qt_plugin_instance'
.obj/akfieldplugin.o:akfieldplugin.cpp:(.text+0x220): first defined here
collect2: ld returned 1 exit status

jacek
20th April 2007, 10:12
There can be only one Q_EXPORT_PLUGIN macro. Use QDesignerCustomWidgetCollectionInterface.