[Qt-interest] Static custom plugin
Jan
janusius at gmx.net
Thu Dec 17 10:54:23 CET 2009
I solved at least the last liker error:
"undefined reference to `qt_plugin_instance_myplugin()'"
In Q_EXPORT_PLUGIN2 ( PluginName, ClassName ) the PluginName did not
exactly match the TARGET name.
Jan
Jan schrieb:
> Hi,
>
> I have build my app with linking Qt 4.6.0 statically. But I get errors
> when I am trying to add a designer plugin.
>
> I found the follwing in the Qt docs:
> It is also possible to create your own static plugins, by following
> these steps:
> 1. Add CONFIG += static to your plugin's .pro file.
> 2. Use the Q_IMPORT_PLUGIN() macro in your application.
> 3. Link your application with your plugin library using LIBS in the
> .pro file.
>
> http://qt.nokia.com/doc/4.6/plugins-howto.html
>
> I build the plugin with CONFIG += designer plugin release static
> and TARGET = myplugin.
> I moved it to QTDIR/plugins/designer and added Q_IMPORT_PLUGIN(myplugin)
> to my app's main.cpp and LIBS += path/to/myplugin
>
> I get many linker errors and finally "undefined reference to
> `qt_plugin_instance_myplugin()'"
>
> I have no idea what I am doing wrong.
>
> The sqlite plugin works without a problem in a static build.
>
>
> Jan
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list