ERROR: This application is failed to start because it could not find or load the Qt Platform plugin "windows"

Asked

Viewed 830 times

6

I am in error when running a program that was created with Qt , it generates the photo error! This error is generated when running exe, all the dlls indicated in the Walker dependency are in the exe folder.

Someone would know to help me?

Thank you, from now on.

inserir a descrição da imagem aqui

  • 1

    Hi Jefferson. You mention a photo, but you didn’t put it in the question.

1 answer

8

From Qt5 you must have the following structure:

+-+ pasta do aplicativo)
  |-- Aplicativo.exe
  |-- Qt5Core.dll
  |-- Qt5Widgets.dll
  |-- outras dlls dos módulos usados
  +-+ platforms
    |-- qwindows.dll

The Platforms folder should be at the same level as your . exe, and contain the . dll (in the case of Windows, .so in *Nix, etc.) referring to the operating system in question.

In your case just create the folder "Platforms" next to the application and put the "qwindows.dll" inside.


PS: Well noted detail, mentioned by @Luizvieira:

I know the question is about Windows. But I think it’s worth remembering that in *Nix there is no guarantee to work just by putting shared libraries in the same application folder. It is necessary to define LD_LIBRARY_PATH (tldp.org/HOWTO/Program-Library-HOWTO/Shared-Libraries.html) or use the QMAKE_LFLAGS_RPATH directive in . pro (Qt-project.org/doc/Qt-4.8/...).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.