Qt5静态构建产量无法加载平台插件“窗口” [英] Qt5 Static Build yields Failed to load platform plugin "windows"

查看:400
本文介绍了Qt5静态构建产量无法加载平台插件“窗口”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用 Visual Studio 2012 编写Qt应用程序。
使用Qt加载项和 Qt 5.0.2 的自定义构建的静态分布。
当我运行应用程序时,我遇到了可怕的无法加载平台插件窗口错误。
我添加了以下链接器输入:

I am writing a Qt application on Windows using Visual Studio 2012. Using the Qt Add-in and a custom built static distribution of Qt 5.0.2. I am running into the dreaded "Failed to load platform plugin windows" error whenever I run the application. I have added the following to the linker input:

imm32.lib
winmm.lib
Ws2_32.lib
qtmaind.lib
Qt5Cored.lib
Qt5Guid.lib
Qt5Widgetsd.lib

一开始我想,也许我应该添加qwindowsd.lib到该列表,以及然而,没有解决这个问题。我需要做什么才能使我的应用程序运行?

At first I thought that maybe I should add "qwindowsd.lib" to that list as well however that did not fix the problem. What do I need to do in order to make my application run?

推荐答案

我解决了。感谢我能够使一切工作。我添加了以下库:

I solved it. Thanks to this I was able to get everything to work. I added the following libraries:

opengl32.lib
Qt5PlatformSupport.lib
qwindows.lib

我还在代码中添加了以下内容:

I also added the following to my code:

#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);

这篇关于Qt5静态构建产量无法加载平台插件“窗口”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆