[SOLVED]Failed to load platform plugin "windows"
-
I am working on Qt5.0.0rc2 and build for VS2010 64bit. I installed the VS AddIn for the RC2. Compiling was successful with minor problems as ending 5s in the names of the libs preconfigured with the VSAddIn. Thats all Ok for me. I started a debug session and got the error message stated above.
Failed to load platform plugin "windows". Available platforms are:
none. No platforms were listed. I think there is one more abstraction layer introduced in Qt4.8 and mandatory for Qt5.0 but I do not find a way or hint how to build this plugins.
some ideas?
Thanx, Harald. -
Thanks Lukas. After a little debugging I found that one enviroment variable was not set correctly. The name of this is "QT_QPA_PLATFORM_PLUGIN_PATH". After creating this varible in the enviroment and setting it to the path you explained above the program started normally. Thanx fine. That was fast. I can close the post.
-
This message is returned from a program that was built without
// This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)Please link to the documentation for this.
Problem
Some or all tests are built without this from
qmake
Workaround
SOURCES += plugin_import.cpp
LIBS += Qt5PlatformSupportd.lib windowsd.lib rpcrt4.lib -
Btw. Lukas - can you create sticky threads?
Threads like "can't run from cmd" or "work's fine in creator but not on other machines" about the proper deployment on windows seem to flood this forum lately so maybe it would be beneficial to create a sticky thread with a simple "what you need" for each compiler eg. for MSVC:
AppDir/App.exe
AppDir/Qt5Core.dll
AppDir/Qr5Gui.dll
...
AppDir/platforms/qwindows.dll
...
AppDir/imagefomats/qgif.dll
...
AppDir/sqldrivers/qsqlite.dll
...- install MSVC runtime package
What do you think?
-
[quote author="Krzysztof Kawa" date="1357386479"]
- install MSVC runtime package[/quote]
Just a note about this: With VS2008 (MSVC 9.0) we indeed have to install the MSVC Runtime package, by running the MSVC Redistributable setup program. That's because VS2008 (and VS2005 too) uses WinSxS to manage the CRT DLL's - putting the required CRT DLL's into the same folder as the EXE file does not work. They have to be "registered" with WinSxS. Fortunately with VS2010 and VS2012 Mircrosoft has changed this again, so now the CRT DLL's are just "normal" DLL's you can put into the same folder as the EXE file and that's it :-)
And another pitfall: If you use a different compiler for your EXE file than for the Qt DLL's - for example you compile your EXE with MSVC 11.0 but then use the pre-compiled Qt DLL's (with MSVC 10.0) from the official "Qt libraries" package - you will end up with an EXE file that needs the CRT DLL's of MSVC 11.0, but also depends on the Qt DLL's that in turn need the CRT DLL's of MSVC 10.0. In the end you will have to ship both versions of the CRT DLL's for the application to work. This is easy to miss, because on a developer's machine usually all the run-times will be installed globally - because Visual Studio has been installed on the machine...
Conclusion: Whenever possible (e.g. license-wise) use the static Qt DLL's with the static MSVC CRT :-)))
-
[quote author="Krzysztof Kawa" date="1357386479"]What do you think?[/quote]
Having a deployment guide for Qt 5 is for sure quite a good idea, maybe a "Wiki article":http://qt-project.org/wiki/ or a "FAQ entry":http://qt-project.org/faq - which can be linked in a sticky thread or at least as reference one can point to.
The thing is - one who will find the Wiki article or the FAQ entry will find one of this existing threads too. One who doesn't usually won't find them either. ;-)
Nevertheless definitely a good idea!
-
Well there is "this page":http://qt-project.org/doc/qt-4.8/deployment-windows.html obviously but I feel beginners can be a little overwhelmed by the verbosity of the info, since unfortunately most of the time they expect to be told explicitly "copy this form here to there".
-
hello all
I am using MSVC 2012 and I am migrating from Qt4.8 to Qt.5.1 (or .2 I see it is available now)I want to design a program which works on any PC (either XP, W7 and W8): checking this is cumbersome since my design PC has installe Qt and MSVC redistributable (as part of MSVC2012). In fact the program works perfectly on my PC.
I am distributing the program with the InstallShield package which come for free with MSVC2012
I understand I need to support the MSVC run time support (done)
If I run my application on most of PC I get the infamous error:
"This application failed to start because it could not find or load the Qt platform plugin "windows" "
I tried to manually add in the application path of the target pc (not my pc) the directories
plugins/platforms/ and put qwindows.dll inside but did not help
I am using MSVC project file and InstallShield (as I said). I can see many discussion on this point but I cannot find a conclusive solution for me.
What perfectly worked with Qt4 now is not with Qt 5 ...
thanks for your help
-
-
I solved adding platforms/qwindows.dll and the libs mentioned above
-
I am having the same problem.
First the error showed no available platforms.
Adding qwindows.dll to platforms made it show up as "available platforms : windows."But that is still the next step in getting this error.
I added libegl.dll.
I don't have libGLEv2.dllThats after installing at the destination.
EDIT :
At home I have libglev2.dll but no libegl.dll.(installed qt and mingw at both locations and its already different in available dll's.)
Even the quick and dirty trick isnt working.
So I wrote an app that only works on my computer. Great.mingw.
-
I am getting an error exactly as mentioned without any dll files in the error message when executing the release version of the built application, and an error related to QCore.dll as mentioned above when executing the debug version of the built application.
-
[quote author="abraker95" date="1402546761"]I am getting an error exactly as mentioned without any dll files in the error message when executing the release version of the built application, and an error related to QCore.dll as mentioned above when executing the debug version of the built application.[/quote]Hi, try http://qt-project.org/wiki/Deploy_an_Application_on_Windows
-
[quote author="abraker95" date="1402547512"]No luck. I checked to make sure I have the needed file structure, and made sure to include libEGL.dll.[/quote]
Did you include all the DLLs and all the plugin folders?
Does your program run from Qt Creator?
If you answer "yes" to both questions, please post a screenshot of your deployment folder and post the exact error message. To post a screenshot, upload it to an image host (e.g. imgur, flickr) and link to it here.
-
I copied all the DLL's from the mingw48_32 and msvc2012_opengl folders and all folders within the plugins folder and the application still shows the same error. And no it doesn't work in Qt.
!http://i59.tinypic.com/2wrj42s.jpg(1)!
!http://i59.tinypic.com/30ma2on.jpg(2)!
!http://i61.tinypic.com/2vte6ok.jpg(3)!
!http://i59.tinypic.com/fmmes5.jpg(4)!
!http://i57.tinypic.com/r6wr9i.jpg(Qt)!