[Qt-interest] Qt Complain About Incompatible Plugins

Karol Krizka kkrizka at gmail.com
Thu Apr 9 03:28:15 CEST 2009


Hi all,

I'm working on a project which supports loading custom plugins, for
which I'm using Qt's plugin system. This works well on Mac and Linux,
but not on Windows. When I try to load a plugin, I get the following
error:

The plugin 'C:/amelia/trunk/plugins/ABase.dll' uses incompatible Qt
library. (Cannot mix debug and release libraries.)

Both the plugin and the application were compiled with the same
configuration. To compile, I am using CMake which generates a VC++2008
solution with the application and all the plugins as separate projects
in the solution. This setup used to work on Window with the Qt 4.5
betas, but it stopped working after I remade the VC++2008 file to work
with Qt 4.5. I made sure to clean any files generated by the compiler,
so there aren't any stale files from when I was using 4.5-betas.

When I print QLibraryInfo::buildKey() from the application, I get the following:
Windows msvc debug full-config

When I look into the registry, via reg-edit, I find the following
entry for my plugin.
Under HKEY_CURRENT_USER -> Software -> Trolltech ->
OrganizationDefaults -> Qt Plugin Cache 4.5.debug -> C: -> amelia ->
trunk -> plugins:
Name: ABase.dll
Type: REG_MULTI_SZ
Data: 40500 0 Windows msvc debug full-config 2009-04-08T18:05:03

I also tried to delete the Trolltech node in the registry, without any success.

Any ideas as to what could be wrong?
--
Cheers,
Karol Krizka



More information about the Qt-interest-old mailing list