PDA

View Full Version : plugin verification data mismatch error



rashmi
27th January 2011, 08:33
hey all,

i am interested in adding my own widget to list of custom widgets available in qtcreator. i wrote simple helloworld.cpp program generated libhelloworld.so file

ldd libhelloworld.cpp gives the following output:


linux-gate.so.1 => (0xb7efe000)
libQtGui.so.4 => /usr/local/qt/qt/lib/libQtGui.so.4 (0xb738d000)
libQtCore.so.4 => /usr/local/qt/qt/lib/libQtCore.so.4 (0xb70af000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7088000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6f95000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6f70000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6f65000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb6e16000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb6e11000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb6e07000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb6d56000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb6ce9000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb6cad000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb6ca5000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb6c8d000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb6c84000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb6c5a000)
libz.so.1 => /usr/lib/libz.so.1 (0xb6c45000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb6c37000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb6b50000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6b4b000)
/lib/ld-linux.so.2 (0xb7eff000)
libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb6b24000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6b03000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb6b00000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb6afe000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6ae5000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6ae0000)

i tried adding this libhelloworld.so file to /usr/local/qt/bin/designer i have following error

plugin verification data mismatch in /usr/local/qt/bin/designer/libhelloworld.so

could any one suggest me something on this issue

bmn
8th December 2011, 19:19
Read the documentation section "How to Create Qt Plugins" carefully. You may be missing one of the required steps.



Making an application extensible through plugins involves the following steps:

Define a set of interfaces (classes with only pure virtual functions) used to talk to the plugins.
Use the Q_DECLARE_INTERFACE() macro to tell Qt's meta-object system about the interface.
Use QPluginLoader in the application to load the plugins.
Use qobject_cast() to test whether a plugin implements a given interface.

Writing a plugin involves these steps:

Declare a plugin class that inherits from QObject and from the interfaces that the plugin wants to provide.
Use the Q_INTERFACES() macro to tell Qt's meta-object system about the interfaces.
Export the plugin using the Q_EXPORT_PLUGIN2() macro.
Build the plugin using a suitable .pro file.



--
blog.msoares.pro.br

ChrisW67
8th December 2011, 23:12
i tried adding this libhelloworld.so file to /usr/local/qt/bin/designer i have following error

plugin verification data mismatch in /usr/local/qt/bin/designer/libhelloworld.so

could any one suggest me something on this issue

QPluginLoader and Loading and Verifying Plugins Dynamically describe the checks that the plugin loader makes. Assuming the source code is good, you have either built the plugin against a different Qt version, the same version but a different Qt configuration, for a different architecture, or with a different C++ compiler from the one used for your Designer (name mangling differs by compiler).