Qt 5.1.1:应用程序无法启动,因为平台插件“windows"无法启动不见了

2021-12-09 00:00:00 windows qt c++ visual-studio-2012

有些人开始将我的问题标记为重复.不要忘记当我问这个问题时存在许多类似的问题(参见例如下面的列表).但是,这些答案都没有解决我的问题.经过长时间的搜索,我发现了一条评论,所有用户都忽略了该评论,指向缺失的库.现在,几个月后,评论已更改为答案.但是,当我自己回答这个问题时,我打算通过直接提供解决方案来帮助其他人.这不应该被遗忘,到目前为止,我的回答帮助了很多人.因此,我的问题绝对不是重复的.顺便说一句:顶部提供的链接中接受的答案不能解决问题!

Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. the list below). However, none of these answers solved my problem. After a long search I found a comment which had been ignored by all users pointing to the missing lib. Now, many months later, the comment has been changed to an answer. However, when I answered this question by msyself I intended to help other people by directly providing the solution. This should not be forgotten and so far my answer helped a lot of people. Therefore my question is definitely not a duplicate. By the way: The accepted answer within the provided link on top does not solve the problem!

是的,我使用了搜索:

无法加载平台插件windows";.可用平台有:错误

从 Visual Studio qwindows 部署 Qt C++ 应用程序.dll错误

加载平台插件失败窗户"可用平台有:windows、minimum

但是,就我而言,问题仍然存在.我在 Visual Studio 2012 中使用 Qt 5.1.1,并在 Windows 7 上使用 Qt Creator 2.8.1 开发了我的应用程序.应用程序以发布"模式编译,如果直接使用 Qt Creator 启动即可执行.

However, in my case the problem still persists. I am using Qt 5.1.1 with Visual Studio 2012 and developed my Application on Windows 7 with Qt Creator 2.8.1. Application is compiled in "Release"-mode and can be executed if directly started with Qt Creator.

但是,当从发布"文件夹开始时,我收到以下消息:

However, when starting from the "release"-Folder, i get the following message:

此应用程序无法启动,因为它无法找到或加载Qt 平台插件windows".可用的平台插件有:最小、屏幕外、窗口.

This application failed to start because it could not find or load the Qt platform plugin "windows". Available platform plugins are: minimal, offscreen, windows.

文件夹结构如下:

release
+ gui.exe
+ icudt51.dll
+ icuin51.dll
+ icuuc51.dll
+ libGLESv2.dll
+ Qt5Core.dll
+ Qt5Gui.dll
+ Qt5Widgets.dll
+ platforms

Platforms 是直接从 QtQt5.1.15.1.1msvc2012pluginsplatforms 复制的文件夹,包括例如qwindows.dll.如果我像其他一些用户那样将其重命名为平台",则无关紧要.Qt还是没有找到平台插件窗口",我错在哪里?

Platforms is the folder directly copied from QtQt5.1.15.1.1msvc2012pluginsplatforms including e.g. qwindows.dll. Does not matter if I rename it to "platform" as some other users did. Qt is still not finding the "platform plugin windows", where is my mistake?

推荐答案

好的,正如这里发布的 https://stackoverflow.com/a/17271172/1458552 没有被其他用户过多关注:

Okay, as posted here https://stackoverflow.com/a/17271172/1458552 without much attention by other users:

libEGL.dll 丢失了!即使在尝试启动应用程序时没有报告此问题(所有其他 *.dll 文件,如 Qt5Gui.dll 均已报告).

The libEGL.dll was missing! Even though this has not been reported when trying to start the application (all other *.dlls such as Qt5Gui.dll had been reported).

相关文章