failed to load platform plugin "windows" Available platforms are: windows, minimal
Asked Answered
D

2

2

Hi Im trying to execute my .exe file from the debug folder.

Now before you go telling me about all the other related articles Ive looked at them all and their solutions are not helping with my problem.

Ok first off Im using Qwt library and trying to create a set of gauges. I got a gauge working now I need to get it to execute from the .exe.

Ive tried adding the platforms folder in with my directory and adding the windowsd.dll and minimald.dll but still does not work.
Please advise on any course of action this had got me stumped.

Also one post says to create a qt.conf file and place it in the directory but I cant find out how to make a .conf file.

UPDATE the error reads debug error! Program: ...build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug\debug\gauge.exe Module:5.0.1 File: kernel\qguiapplication.cpp Line:781

Failed to load platform plugin "windows". Available platforms are: minimal Windows

Demmy answered 19/2, 2013 at 17:37 Comment(4)
can you share the exact text of the error message?Fancyfree
I added the error to my question.Demmy
sounds like the problem is a DLL loading issue. First I would use dependency walker to make sure that you have all the DLL dependencies. The error is coming because Qt get's a null result from QPlatformIntegrationFactory::create(name, platformPluginPath), which implies that the windows integration platform DLLs are not in your platformPluginPathFancyfree
Use windeployQtVaranasi
C
1

When deploying Qt on Windows, you have to copy over a number of the dlls from the bin folder of the Qt directory.

On my system it is:

C:\Qt\4.8.4\bin

After you copy over all the required dll's from there, like QtCore4.dll and QtGui4.dll, if you are using any additional plugins like phonon or jpeg support, you need to copy those dll's over from the plugins folder:

C:\Qt\4.8.4\plugins

For example I make a folder in the folder with my exe called imageformats and I put qjpeg4.dll in that folder.

As far as Qwt works, you probably need to do a similar process to expose those dll's to your exe, and put them in the same folder as your exe.

The dll's listed above are for the "release" build of your exe. If you are running the "debug" version, it will look for <dll_name>d.dll.

The reasoning for putting in those paths has to do with the library search order that windows uses.

Qt, Phonon and multimedia codecs: how to bundle them?

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx

http://qt-project.org/doc/qt-4.8/deployment-windows.html#creating-the-application-package

Hope that helps.

Continuo answered 19/2, 2013 at 20:2 Comment(0)
R
1

If you have several executable and\or you don't want to copy plugins by hand, you can create a qt.conf file with the path to the plugin directory

[Paths]
Plugins = PATH_TO_QT_DIR/plugins

You need to place the qt.conf file where the executable is.
More information at http://doc.qt.io/qt-5/qt-conf.html

Rife answered 30/11, 2016 at 15:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.