問題描述
我已經(jīng)查看了似乎與堆棧溢出相關(guān)的所有問題,但似乎沒有任何解決方案對(duì)我有幫助.
I have looked through all of the questions that appear to be related on stack overflow, and none of the solutions seem to help me.
我正在使用此設(shè)置構(gòu)建 Qt 應(yīng)用程序:
I am building a Qt application with this setup:
- Windows 7 專業(yè)版 x64
- Visual Studio 2012
- 使用
configure -developer-build -debug-and-release -opensource -nomake examples -nomake tests -platform win32-msvc2012 -no-opengl
構(gòu)建的 Qt 5.2.0 - 項(xiàng)目使用 QtSingleApplication (qt-solutions)
- 應(yīng)用程序是一個(gè) 32 位應(yīng)用程序
- qmake 使用以下命令運(yùn)行:-makefile -spec win32-msvc2012
- .pri 使用
QMAKE_CXX +=/D_US??ING_V110_SDK71_
我可以在我的開發(fā)機(jī)器上很好地構(gòu)建和運(yùn)行我的程序(如上所述);我也可以從開發(fā)機(jī)器上的 Program Files 目錄安裝和運(yùn)行包.
I can build and run my program fine on my development machine (noted above); I can also install and run the package from Program Files directory on dev machine.
當(dāng)我在一臺(tái) Windows Vista 機(jī)器(多臺(tái)機(jī)器)上安裝并運(yùn)行時(shí)
When I install and run on a Windows Vista machine (multiple machines)
- VC++ redist 2012 11.0.61030.0 已安裝
- VC++ redist 2010 10.0.40219 已安裝
- 加上 2005、2008 版本的 redist
(在全新安裝 Windows 7 時(shí)也會(huì)失敗)
(also fails on a clean install of Windows 7)
我明白了:
應(yīng)用程序無法啟動(dòng),因?yàn)樗鼰o法找到或加載 QT 平臺(tái)插件windows"
所以我按照說明添加了一個(gè).platforms/目錄,并添加了qwindows.dll(也添加了qminimal.dll和qoffscreen.dll);我還添加了 libEGL.dll、libGLESv2.dll(盡管我認(rèn)為不需要它們)
So I followed the instructions and added a .platforms/ directory, and added qwindows.dll (also added qminimal.dll and qoffscreen.dll); I also added libEGL.dll, libGLESv2.dll (even though I shouldn't need them I don't think)
添加 qoffscreen.dll 后,我現(xiàn)在收到附加消息:可用的平臺(tái)插件是:offscreen
Once I added qoffscreen.dll I now get the additional message: Available platform plugins are: offscreen
如果我運(yùn)行 Dependency Walker,則會(huì)列出此錯(cuò)誤:
If I run through Dependency Walker I get this error listed:
GetProcAddress(0x76CA0000 [KERNEL32.DLL], "GetCurrentPackageId") called from "MSVCR110.DLL" at address 0x6AC6FDFA and returned NULL. Error: The specified procedure could not be found (127).
然后進(jìn)一步向下得到:
GetProcAddress(0x745A0000 [UXTHEME.DLL], "BufferedPaintUnInit") called from "COMCTL32.DLL" at address 0x745FFBF8 and returned 0x745AE18C.
This application failed to start because it could not find or load the Qt platform plugin "windows".
Available platform plugins are: offscreen.
Reinstalling the application may fix this problem.
任何想法如何解決這個(gè) dll 問題?
Any ideas how to fix this dll issue?
推薦答案
好吧,我解決了我的問題,雖然我不確定有什么區(qū)別:
Well I solved my issue, although I'm not sure what the difference is:
我將 qt 目錄中的每個(gè) dll 都復(fù)制到了應(yīng)用程序目錄的 ./和 ./platforms 中.
I copied every dll from my qt directory into both ./ and ./platforms of my application directory.
應(yīng)用程序克服了錯(cuò)誤,但隨后崩潰了.
The application got past the error, but then crashed.
VERSION.dll 導(dǎo)致崩潰(在依賴項(xiàng)walker 中注明),所以我從兩個(gè)地方都刪除了它.
VERSION.dll was causing the crash (noted in dependency walker), so I removed it from both places.
應(yīng)用程序啟動(dòng)了,所以我系統(tǒng)地刪除了所有不需要的 dll.
The Application started up, so I systematically removed all unneeded dll's.
這讓我回到了最初的狀態(tài).
This got me back to the same state I had originally.
然后我卸載了我的應(yīng)用程序并重新安裝(只剩下 ./platforms/qwindows.dll 文件),應(yīng)用程序正常工作.
I then uninstalled my application and re-installed (with only the ./platforms/qwindows.dll file remaining), application works correctly.
所以我只能假設(shè)我在平臺(tái)目錄中的 qwindows.dll 版本不正確.
So all I can assume is that I had an incorrect version of qwindows.dll in the platforms directory.
這篇關(guān)于應(yīng)用程序無法啟動(dòng),因?yàn)樗鼰o法找到或加載 QT 平臺(tái)插件“windows"的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!