October 21, 2012

MByte MByte
Lab Rat
3 posts

[SOLVED] Failed to load platform plugin “windows”.

Page  
1

I built Qt5 64-bit with -platform win32-msvc2012 -opengl es2 -angle <path> on Windows 8.

Whenever I try to compile and run a Qt program, I get the following error:

  1. Failed to load platform plugin "windows".
  2. Available platforms are:
  3. minimal
  4. windows

If I build without ANGLE support, it works, but I need ANGLE to use OpenGL shaders.

It wasn’t doing this before, but now it seems to happen no matter what. I’ve tried a number of qt5 repository pulls from different dates, different ANGLE repository pulls… even a fresh install of Windows and I still get the same error.

I traced a debug build, and it sees the platform plugin, but it seems that LoadLibrary is failing when trying to load it. Any ideas how to resolve this?

17 replies

October 21, 2012

MByte MByte
Lab Rat
3 posts

Actually, I found the problem. ANGLE’s libEGL.dll also needed to be in the path, not just libGLESv2.dll.

Thanks to toothrot in IRC for having me try Dependency Walker.

October 23, 2012

Rochi Rochi
Ant Farmer
203 posts

Cool.. :)

January 8, 2013

MrNoway MrNoway
Lab Rat
59 posts

it’s the “libEGLd.dll” not the “libEGL.dll”

but thanks, this was puzzling me.

February 1, 2013

napajejenunedk0 napajejenune..
Ant Farmer
157 posts

Which library depends on libEGL? libGLES or Qt5Widgets, Qt5Gui? Since, using Dependency Walker, neither my Qt 5 application’s executable, nor the libraries it depends on, depend on libEGL. I presume it is loaded dynamically.

March 9, 2013

napajejenunedk0 napajejenune..
Ant Farmer
157 posts

I’ve found that it is qwindows.dll platform plugin that depends on libEGL.

April 24, 2013

d.mancic d.mancic
Lab Rat
3 posts

Hi people,

I have the same problem.

I copied .exe file in separate folder, along with many .dll files.
On the computer where I developed the application, everything works.

However, on the other computers there is still a message:

///////////////////////////////////////////////////////////////////////
Failed to load platform plugin “windows”. Available platforms are:

(Press Retry…)
///////////////////////////////////////////////////////////////////////

I also included qwindowsd.dll.

Can someone help?

Thank you,

Dusan

April 24, 2013

goblincoding goblincoding
Ant Farmer
219 posts

See this thread [qt-project.org] for a list of dll’s and folder structure.

April 24, 2013

d.mancic d.mancic
Lab Rat
3 posts

It helped me! The problem was in folder structure.

Thank you very much!

Dusan

April 24, 2013

SGaist SGaist
Mad Scientist
8955 posts

Hi,

Have a look at the deployment [qt-project.org] documentation.

Did you put your platform plugin in the platform subdir ? (Not in the plugins subdir)

And are you sure you want do deploy the debug version (unless it’s a typo)? The debug runtime from visual studio are not redistributable.

Hope it helps

 Signature 

Need programers to hire ? www.edeltech.ch

April 24, 2013

d.mancic d.mancic
Lab Rat
3 posts

I solved that already (sent in previous email :)), but thanks anyway!

September 19, 2013

CarlStenquist CarlStenquist
Lab Rat
18 posts

THANK YOU MByte! I am using libGLESv2.dll and was having the exact same problem: The pop-up
———————————————————————————————-
..could not find or load the Qt platform plugin windows..
———————————————————————————————-
when trying to run the EXE-file. I could not resolve this until adding libEGL.dll to the same folder as my .EXE.
How is one supposed to figure this out?
This needs be explained somewhere – It took me 4 h. to find this!
Someone please add to QT documentation!
Carl Stenquist, Renesas

 Signature 

P.S. I’m not really a “lab rat”. Just an applications engineer.

February 21, 2014

mphair mphair
Lab Rat
4 posts

I still cannot solve this issue. I’ve added qwindows.dll and libEGL.dll and any other dll I could find and I still get the same popup error.

February 21, 2014

CarlStenquist CarlStenquist
Lab Rat
18 posts

1. Look at what DLLs are loaded when you run the code in QT-Creator.
2. The DLLs must be for the sytem you are running, that is 32 OR 64 bit; the right version.
3. For my app, I needed qwindows.dll, qminimal.dll, qoffscreen.dll in a “platforms” directory under the executable.
But all such info seems missing in the QT documentation.
=Carl

 Signature 

P.S. I’m not really a “lab rat”. Just an applications engineer.

February 22, 2014

JKSH JKSH
Area 51 Engineer
2686 posts

mphair wrote:
I still cannot solve this issue. I’ve added qwindows.dll and libEGL.dll and any other dll I could find and I still get the same popup error.
Hi,

Did you put them in the correct folders? See http://qt-project.org/wiki/Deploy_an_Application_on_Windows

February 24, 2014

CarlStenquist CarlStenquist
Lab Rat
18 posts

JKSH
How did you find that page – other than by through a search? I cannot see a link to it on the Wiki Home page. http://qt-project.org/wiki

Is the page so new that it is not linked to the main page yet?
=Carl

 Signature 

P.S. I’m not really a “lab rat”. Just an applications engineer.

Page  
1

  ‹‹ [Solved]Qt4.8.1 for Desktop (MinGW) Compiler Error (-Wl,-subsystem,windows)      Questions about building 32 bit and 64 bit version of QT. ››

You must log in to post a reply. Not a member yet? Register here!