【问题标题】:Load the Qt platform plugin "windlows" in ""在“”中加载Qt平台插件“windlows”
【发布时间】:2017-05-09 15:17:48
【问题描述】:

我正在运行使用 Qt+MSVC15 编译的可执行文件。当我在另一个 Windows 系统上安装相同的 .exe 时,它​​给了我以下错误。

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

第一次尝试解决它:

以下是我的文件夹结构的结构:

-MyExecutable (containing example.exe)
 |_plugins 
   |_example1.dll
   |_platforms
     |_qwindows.dll

1.a 因为它无法找到 qwindows.dll 的路径。我创建了如上图所示的文件夹平台,并将平台文件夹从“C:/Qt/Qt5.6.1/Tools/QtCreator/bin/plugins/platforms/”复制到其中。

1.b 我设置了环境变量QT_PLUGIN_PATH={path to folder contains executable}/plugins

此设置运行我的应用程序,但未包含 others.dll,因此 GUI 功能较少。

如何进行更改,以便其他人.dll 也应链接/包含在我的 GUI 应用程序中。

【问题讨论】:

    标签: c++ qt


    【解决方案1】:

    您应该将所需的 dll 复制到测试计算机上的目录中。然后,您应该将此目录添加到系统路径中。

    我正在使用 qt 5.5。

    我的 dll 路径:C:\Qt\5.5\msvc2013\bin

    另外,你应该在测试计算机上创建这个路径:C:\Qt\5.5\msvc2013\plugins\platforms

    您应该将 qwindows.dll 文件复制到该目录。

    然后,您还应该将此路径添加到系统路径中。

    【讨论】:

      【解决方案2】:

      我刚刚检查了我的 Qt 项目,它看起来像:

      -MyExecutable (containing example.exe) 
       example1.dll
       Qt5Core.dll
       Qt5Gui.dll
       Qt5Widgets.dll
       |- platforms
          qwindows.dll
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-11-16
        • 2016-01-08
        • 2017-03-01
        • 2021-07-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多