問題描述
我已經查看了似乎與堆棧溢出相關的所有問題,但似乎沒有任何解決方案對我有幫助.
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.
我正在使用此設置構建 Qt 應用程序:
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
構建的 Qt 5.2.0 - 項目使用 QtSingleApplication (qt-solutions)
- 應用程序是一個 32 位應用程序
- qmake 使用以下命令運行:-makefile -spec win32-msvc2012
- .pri 使用
QMAKE_CXX +=/D_US??ING_V110_SDK71_
我可以在我的開發(fā)機器上很好地構建和運行我的程序(如上所述);我也可以從開發(fā)機器上的 Program Files 目錄安裝和運行包.
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.
當我在一臺 Windows Vista 機器(多臺機器)上安裝并運行時
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 時也會失敗)
(also fails on a clean install of Windows 7)
我明白了:
應用程序無法啟動,因為它無法找到或加載 QT 平臺插件windows"
所以我按照說明添加了一個.platforms/目錄,并添加了qwindows.dll(也添加了qminimal.dll和qoffscreen.dll);我還添加了 libEGL.dll、libGLESv2.dll(盡管我認為不需要它們)
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)在收到附加消息:可用的平臺插件是:offscreen
Once I added qoffscreen.dll I now get the additional message: Available platform plugins are: offscreen
如果我運行 Dependency Walker,則會列出此錯誤:
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).
然后進一步向下得到:
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.
任何想法如何解決這個 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 目錄中的每個 dll 都復制到了應用程序目錄的 ./和 ./platforms 中.
I copied every dll from my qt directory into both ./ and ./platforms of my application directory.
應用程序克服了錯誤,但隨后崩潰了.
The application got past the error, but then crashed.
VERSION.dll 導致崩潰(在依賴項walker 中注明),所以我從兩個地方都刪除了它.
VERSION.dll was causing the crash (noted in dependency walker), so I removed it from both places.
應用程序啟動了,所以我系統(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.
然后我卸載了我的應用程序并重新安裝(只剩下 ./platforms/qwindows.dll 文件),應用程序正常工作.
I then uninstalled my application and re-installed (with only the ./platforms/qwindows.dll file remaining), application works correctly.
所以我只能假設我在平臺目錄中的 qwindows.dll 版本不正確.
So all I can assume is that I had an incorrect version of qwindows.dll in the platforms directory.
這篇關于應用程序無法啟動,因為它無法找到或加載 QT 平臺插件“windows"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!