[Qt-interest] plugin can't be loaded under Windows

clinton at elemtech.com clinton at elemtech.com
Sat Jul 11 05:06:55 CEST 2009


Maybe be sure you're using a recent cmake version?
If the one you have is really old, it didn't add the right compile flags for plugins to work right.

Clint


----- Original Message -----
From: "Dong Tiger" <idlecat511 at gmail.com>
To: "Ender EREL" <erelender at yahoo.com>
Cc: qt-interest at trolltech.com
Sent: Friday, July 10, 2009 8:31:45 AM GMT -07:00 US/Canada Mountain
Subject: Re: [Qt-interest] plugin can't be loaded under Windows



Hi Ender, 

The error msg says "(The plugin) uses incompatible Qt library. (Cannot mix debug and release libraries.)". So I think you are right. 
But I have no idea why it happens since all the code are in same CMake project and built with same configuration. 


-- 
Tiger 





2009/7/10 Ender EREL < erelender at yahoo.com > 





Dong Tiger wrote: 
> Hi, 
> 
> I ran into a strange problem. I am using 
> Qt(qt-sdk-win-opensource-2009.01.1) and MinGW(gcc 4.4.0). CMake is used 
> as the build system. And I used Qt Plugin mechanism in my program. 
> 
> If I compile the code with debug enabled ( cmake 
> -DCMAKE_BUILD_TYPE=debug), plugins will be loaded successfully. But if 
> not, QPluginLoader::instance just returns NULL. 
> 
> I tried to compare the cmd line of debug mode and non debug mode. The 
> only difference seems to be that in debug mode there is " -DQT_DEBUG" in 
> g++ arguments and non-debug mode doesn't have that. 
> 
> Any idea of that? TIA. 
> 
> -- 
> Tiger 

What does QPluginLoader.errorString() method return? 

If the plugins are built in debug mode and your application is built in 
release mode, the configuration difference may be causing this. 

-- 
Ender EREL 
_______________________________________________ 
Qt-interest mailing list 
Qt-interest at trolltech.com 
http://lists.trolltech.com/mailman/listinfo/qt-interest 


_______________________________________________
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