0
votes

I try to deploy a Qt app on a basic Windows 7 Pro SP1 machine. My app works fine when I run it inside Qt Creator or on any machine with Qt insllated.

I have read a lot of posts and try many different things without success.

Things tried :

  • Windeploy Qt
  • Quick and dirty method of Qt Wiki
  • Add mingwm10.dll
  • Add libEGL.dll
  • Check loaded dll with dependency walker
  • Check loaded dll with Qt Creator debugger

My app crashes when I run it with these two error messages :

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

This application has requested the runtime to terminate it in an unsual way. Please contact...

This is my current tree (obtained with windeployqt) : *.exe

*.dll

platforms/qwindows.dll

imageformats/*.dll

iconengines/*.dll

With dependency walker, I have some red lines even if the app runs normally but nothing interesting.

Dev machine info :

  • Windows 7 Pro Sp1 64 Bits
  • Qt Creator 3.3.0
  • MinGW 4.9.1 32 Bits
  • Qt SDK 5.4.0

I'm probably doing something wrong but what ?!

The executable seems to search something in the Qt base directory because when I rename it the deployed app doesn't want to work anymore.

Need help please ;)

1

1 Answers

0
votes

Ok, I found the solution... I added this line at the very beginning of my main function :

QApplication::addLibraryPath("./");

After that, windeployqt does the job. I hope it will help someone in the future.