0

I tried making an executable file of my program but there are some errors which I did not understand or could not find solutions of. I used my .exe file onto another computer and there was an error. I made my program through QtCreator (v 5.1.1)with my Windows 7, 64-bit laptop. There was an error when I used it in 2 32-bit laptops.

The error message says:

This application failed to start because it could not find or load the Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen, windows.

Reinstalling the application may fix the problem.

I already created a new folder called "platforms" containing "qminimal.dll", "qoffscreen.dll" and "qwindows.dll" in the same level of my .exe file. I also pasted in the same level the other DLLs that my program needs.

Community
  • 1
  • 1
theforest
  • 1
  • 1
  • 3
  • Have you built your application for 32 bit Windows or 64 as the original host? You cannot run 64 bit executables on 32 bit windows. – László Papp Mar 08 '14 at 16:53
  • My laptop, where I built my program, is 64-bit Windows. I made an exe file back then in the same laptop when I still used Qt 4.8.4 or something like that and it worked with other laptops with 32-bit windows. – theforest Mar 08 '14 at 16:59
  • My question still stands: are you building 32 binary or 64? You should know it. – László Papp Mar 08 '14 at 17:01
  • Also, does the target Windows have the same Visual Studio installation or have you at least installed the corresponding runtime redistributable? – László Papp Mar 08 '14 at 18:26
  • 1
    Possible duplicate of [Qt5 Static Build yields Failed to load platform plugin "windows"](http://stackoverflow.com/questions/16773789/qt5-static-build-yields-failed-to-load-platform-plugin-windows) – Jim G. Oct 30 '16 at 13:10

2 Answers2

1

In Qt 5.2, there is a tool that can be used for deployment on Windows: windeployqt. It will be in the bin folder of your Qt installation. It greatly simplifies deployment, so if you don't mind downloading a newer Qt version, I'd highly recommend it. It may even work with an older Qt version, but I haven't tested it.

Mitch
  • 23,716
  • 9
  • 83
  • 122
0

We had exact same problem with Qt5.3.

Problem arised when we've rebuilt the Qt to reduce dependencies (e.g. Qt5Positioning, Qt5Sensors). Created dlls were copied to different directory (source for installation), but we forgot to copy also newly created platforms plugin dlls.

The problem was fixed by using all dlls from same Qt build (with same configuration).

Your problem is probably the same: mixing dlls from different Qt builds (e.g. different configuration, version,...).

Vydra21
  • 101
  • 1
  • 3