[Interest] [Development] When debugging an application (using visual studio), Failed to load platform plugin "windows". Available platforms are:

Koehne Kai Kai.Koehne at digia.com
Mon May 13 10:25:36 CEST 2013



> -----Original Message-----
> From: 魏越闽 [mailto:weiyuemin at 7fgame.com]
> Sent: Monday, May 13, 2013 10:06 AM
> To: Koehne Kai; Qt Interest (interest at qt-project.org)
> Subject: Re: [Development] When debugging an application (using visual
> studio), Failed to load platform plugin "windows". Available platforms are:
> 
> Hi,
> Very sorry for misusing the mail list. And thank you for the comments.
> 
> 1). I've checked there's no qt.conf along my .exe. I don't even know what is
> qt.conf before.
> 
> 2). The loading of plugins fails no matter debug or release. There are indeed
> debug versions (XXXd.dll) of the plugins in my Qt directory. In fact, my .exe
> will be able to start if I copy all Qt dlls and plugins along my .exe. But it's
> inconvenient to copy a bundle of dlls whenever I create a small Qt project
> maybe for test something. It's also inconvenient when I want to use another
> Qt version.

The locations where Qt searches for plugins is actually hardcoded in QtCore. Easiest to show it is by running 'qmake -query' and look for 'QT_INSTALL_PLUGINS'. Is the absolute path shown here the right one?

(Note that this should work even if you don't use qmake directly. It just prints the values from the QtCore library).


> I guess QtVSAddin should set QT_DEBUG_PLUGINS and some other variables
> whenever a start a .exe through visual studio, but sometimes it doesn't. 

No, QT_DEBUG_PLUGINS is just a helper that print more information about the plugin loading process. 

> I
> tried manually set some environment variables in visual studio's
> configuration, but the 'Environment' was always be set to '
> PATH=$(QTDIR)\bin%3b$(PATH)'
> 
> Shall I file a bug about QtVSAddin ?

No, since it's unlikely it's the addins fold. I suspect that your Qt installation is somehow broken / misconfigured, or has been moved around after installation.

Regards

Kai



More information about the Interest mailing list