問(wèn)題描述
我正在使用 Visual Studio 2012 在 Windows 上編寫(xiě) Qt 應(yīng)用程序.使用 Qt 插件和 Qt 5.0.2 的自定義構(gòu)建的靜態(tài) 分發(fā)版.每當(dāng)我運(yùn)行應(yīng)用程序時(shí),我都會(huì)遇到可怕的 無(wú)法加載平臺(tái)插件窗口"
錯(cuò)誤.我在鏈接器輸入中添加了以下內(nèi)容:
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
起初我想也許我應(yīng)該將qwindowsd.lib"也添加到該列表中,但這并沒(méi)有解決問(wèn)題.我需要做什么才能使我的應(yīng)用程序運(yùn)行?
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?
推薦答案
我解決了.多虧了這個(gè),我才能讓一切正常工作.我添加了以下庫(kù):
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
我還在我的代碼中添加了以下內(nèi)容:
I also added the following to my code:
#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
這篇關(guān)于Qt5 靜態(tài)構(gòu)建產(chǎn)生無(wú)法加載平臺(tái)插件“windows"的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!