問題描述
我正在使用 Visual Studio 2012 在 Windows 上編寫 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 靜態構建產生無法加載平臺插件“windows"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!