2
votes

Error message:

This application failed to start because it could not find or load the Qt platform plugin "windows".

Reinstalling the application may fix the problem.

I've done a lot of searching and none of the solutions I've found worked.

I've followed this "Deploy an App on Windows - even the quick and dirty method failed.
I have the /platforms/qwindows.dll in my app root directory.
I've used the dependancy walker app depend.exe we all know and love

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Frankly I don't understand this... language barrier? It says that there are DLLs missing, DCOMP.dll, API-MS-WIN-APPMODEL-RUNTIME-L1-1-0-.dll, API-MS-WIN-CORE-WINRT -ERROR-L1-1-0, -L1-1-0, -ROBUFFER-L1-1-0, -STRING-L1-1-0.DLL and API-MS-WIN-SHCORE-SCALING-l1-1-0.dll, but they are nowhere to be found. Similarily named dlls are included in kernel.dll and MSVCRT.dll. It also mentions IESHIMS.dll, but including it doesn't make a difference.

I have following dlls in my folder:

  • /platforms/qwindows.dll
  • icuin53.dll
  • icudt53.dll
  • icuuc53.dll
  • libEGL.dll (even though my app doesn't use it)
  • libgcc_s_dw2-1.dll
  • libopencv_core2410.dll
  • libopencv_highgui2410.dll
  • libopencv_imgproc2410.dll
  • libstdc++-6.dll
  • IEShims.dll
  • libwinpthread-1.dll
  • Qt5Core.dll
  • Qt5Gui.dll
  • Qt5Widgets.dll

Copied from C:\Qt\5.4.0\5.4\mingw491_32

There's an identical problem with the debug version of the exe, that has *d.dll libraries with it.

I am using Qt 5.4.0 and Mingw32 4.9.1 on Windows 7 64-bit.

The app obviously compiles and runs on my netbook, every other PC gives me the error, however I MUST distribute it. When I change C:\Qt to a different folder name, my netbook also produces the error.

Strange thing is, few versions of the app earlier, there wasn't any kind of problem. I've added a ton of code since then, but I don't remember anything that'd use a different library.

What could possibly be the issue?

1
Represent please some type or message errort3ft3l--i
@t3ft3l--i it's in the title. I'll add the full message, but temporarily I'm on a 1ghz netbook so it might take a while...Petersaber
If you are runnin indebug you may need qwindowsd.dllGPPK
@GPPK it's the release version of the exe. Additionally, I've created a second directory with the debug version and *d.dll librariesPetersaber

1 Answers

0
votes

The problem was not with the libraries. The problem was with the code. There was one line missing from the main.cpp, line that isn't included by default, but should be the first line of main() function.

QCoreApplication::addLibraryPath("./");

int main(int argc, char *argv[])
{
    QCoreApplication::addLibraryPath("./"); //this goddamn line right here
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}