PDA

View Full Version : This application failed to start because it could not find or load the Qt platform pl



8Observer8
1st September 2014, 09:47
Hello!

This is my release folder:
1060510606

But I receive this message:
10607

I took the "libEGL.dll" from here: C:\Qt\Qt5.3.1\Tools\QtCreator\bin

Thank you!

wysota
1st September 2014, 09:57
Your application is looking for the windows plugin not egl plugin. And you should put there plugins from your Qt installation and not your Creator installation, they might be different.

8Observer8
1st September 2014, 10:11
Thank you for reply! What plugin?

Added after 10 minutes:

How did you see I added the "platforms" folder and "qwindows.dll" from here: C:\Qt\Qt5.3.1\5.3\mingw482_32\plugins\platforms

wysota
1st September 2014, 10:23
Does it work now?

8Observer8
1st September 2014, 10:39
No. Can you see this problem on the picture?
10608

Added after 11 minutes:

I opened my exe via depends22_x86. He tells me that GPSVC.dll was not found. I will find it on my computer
10609

wysota
1st September 2014, 10:39
You have mixed MinGW and MSVC binaries. Are you sure you have copied the right set of libraries?

8Observer8
1st September 2014, 11:49
What binaries do you mean? I have only MinGW version of Qt. Can you tell me what I must do?

Added after 5 minutes:


Another thing that isn't very well documented in Qt5.

There are two solutions:

1. Create a file named "qt.conf". Put this in the same directory as your executable. Put this in it:



[Paths]
Plugins=<path to where you want to install shared plugins>/plugins


Then, create a directory called "plugins" in the shared plugins location, and a subdirectory "platforms" inside that. From your Qt distribution, find this same directory, and copy the file "qwindows.dll" from that directory into your own platforms directory.

In this case, your installation looks like:


/YourAppInstallFolder
- YourApp.exe
- any needed Qt DLLs
- qt.conf

/YourSharedPluginsInstallFolder
- /plugins
- /platforms
qwindows.dll

2. You can create the /plugins/platforms directory as a sub-directory of your application install directory, and put the dll there.

In this case, your installation will look like this:


/YourAppInstallFolder
- YourApp.exe
- any needed Qt DLLs
- /plugins
-/platforms
- qwindows.dll

Hope this helps.


I use second... But I receive too message.

I created "plugins\platforms" with "qwindows.dll"

wysota
1st September 2014, 12:11
What binaries do you mean? I have only MinGW version of Qt.

You have at least two versions of Qt -- one for your programs and one for Qt Creator. If nothing has changed recently, QtCreator's binary release is built with MSVC while Qt for your programs is built with MinGW.

8Observer8
1st September 2014, 12:29
Please, tell at least one dll from my directory that built in MSVC?

wysota
1st September 2014, 12:55
Please, tell at least one dll from my directory that built in MSVC?

Just look at your own screenshot where it says "MSVCRT.DLL" which stands for "MSVC RunTime". I don't know what in your app links to that but it is obvious that something does.

faldzip
1st September 2014, 13:04
If you are sure that the "qwindows.dll" is in the right place, but it still can't be loaded on application start, then you should check it's dependencies with depends.exe, not dependencies of your exe. The nature of plugins is that they are loaded in runtime, so their dependencies are also resolved in runtime, so you will not see them by analising your exe.

8Observer8
1st September 2014, 15:06
Why the application require icuin51.dll but here c:\Qt\Qt5.3.1\5.3\mingw482_32\bin\ there is only icuin52.dll

Added after 1 18 minutes:

I deleted old Qt SDK and restart the computer. I deleted all .dll from release and I added them again. And I created "platforms" folder with "qwindows.dll". This is run on another computer :)

Added after 35 minutes:

- platforms/qwindows.dll (from here c:\Qt\Qt5.3.1\5.3\mingw482_32\plugins\platforms\)
- icudt52.dll (dll's are from here: c:\Qt\Qt5.3.1\5.3\mingw482_32\bin\)
- icuin52.dll
- icuuc52.dll
- libgcc_s_dw2-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll
- Qt5Gui.dll
- Qt5SerialPort.dll
- Qt5Widgets.dll