Home >Backend Development >C++ >Why Doesn't My Qt Application Find the 'Windows' Platform Plugin on Windows Vista?
Application Loading Error: "QT Platform Plugin "Windows" Not Found
The issue stems from an inability of the application to locate and load the QT platform plugin named "windows." Despite implementing suggested solutions from previous Stack Overflow inquiries, the problem persists.
Your application setup includes:
The application builds and runs successfully on your development machine. However, when installed and executed on Windows Vista machines with various VC redistributions installed, the following error message appears:
Application failed to start because it could not find or load the QT platform plugin "windows"
To resolve this issue, a .platforms/ directory was created and populated with qwindows.dll (along with other DLLs). Despite these additions, the error message persists, now accompanied by the message:
Available platform plugins are: offscreen
Dependency Walker reveals an error:
GetProcAddress(0x76CA0000 [KERNEL32.DLL], "GetCurrentPackageId") called from "MSVCR110.DLL" at address 0x6AC6FDFA and returned NULL. Error: The specified procedure could not be found (127).
Solution:
To rectify the issue, qwindows.dll must be placed in a folder named platforms, with the path from the executable to the DLL being:
platforms/qwindows.dll
In addition, the following line must be added to the beginning of your main() function:
QCoreApplication::addLibraryPath("./");
These steps will allow the application to locate and load qwindows.dll, resolving the loading error.
The above is the detailed content of Why Doesn't My Qt Application Find the 'Windows' Platform Plugin on Windows Vista?. For more information, please follow other related articles on the PHP Chinese website!