C++ 加载Qt平台插件";“风流”;在&引用;

C++ 加载Qt平台插件";“风流”;在&引用;,c++,qt,C++,Qt,我正在运行使用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 |_e

我正在运行使用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的路径。我创建了如上图所示的文件夹platforms,并将platform文件夹从“C:/Qt/Qt5.6.1/Tools/QtCreator/bin/plugins/platforms/”复制到其中

1.b我设置环境变量QT_PLUGIN_PATH={包含可执行文件的文件夹路径}/plugins

此安装程序运行我的应用程序,但不包括others.dll,因此是一个功能较少的GUI


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

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

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

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

我正在使用Qt5.5

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

此外,您应该在测试计算机上创建此路径:C:\Qt\5.5\msvc2013\plugins\platforms

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

然后,还应将此路径添加到系统路径