Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application deployed with QT5 libraries does not start on Windows 7

Tags:

qt

qt5

Recently we have been migrating our QT based application on Windows from QT 4.8 to QT 5, and we have run into a issue with deployment. Note that our app has not changed, we have only built it with new QT5 framework. With some effort we got it to build with VS2010 based QT5 library; and I successfully ran the app from Qt Creator.

As we did with QT4, we have included a required set of QT libraries with the installer.

In our testing phase, when we installed our QT5 app on a clean machine; it would not start. Not only the application did not start, but it did not output any errors.

We ran the app through the dependency checker; and there were no missing library dependencies at all.

like image 919
Aki Avatar asked Jan 03 '13 17:01

Aki


People also ask

How do I run a Qt program in Windows?

To deploy the application, we must make sure that we copy the relevant Qt DLLs (corresponding to the Qt modules used in the application) and the Windows platform plugin, qwindows. dll , as well as the executable to the same directory tree in the release subdirectory.

Can Qt apps run on Windows?

Yes. The code that you write using Qt will work on Windows, Mac, Linux/X11, embedded Linux, Windows CE and Symbian without any change.


2 Answers

After several days of search with no progress, we stumbled upon a QT bug:

https://bugreports.qt.io/browse/QTBUG-28766

With QT5, in addition to expected QT libraries, msvcr100.dll, and msvcp100.dll; it turns out that you have to ship your application with:

platforms/qminimal.dll platforms/qwindows.dll 

as well. Which is found in your local QT5 library install @: \Qt5.0.0\5.0.0\msvc2010\plugins\platforms I searched everywhere, and I was unable to find this info in their documentation.

like image 92
Aki Avatar answered Oct 20 '22 07:10

Aki


For me to run standalone "Hello World" gui application ( Qt sdk 5.0.1 mingw, Win7 x64 ). I need to add next files to program dir:

  1. platforms/qwindows.dll
  2. D3DCompiler_43.dll
  3. icudt49.dll
  4. icuin49.dll
  5. icuuc49.dll
  6. libEGL.dll
  7. libgcc_s_sjlj-1.dll
  8. libGLESv2.dll
  9. libstdc++-6.dll
  10. libwinpthread-1.dll
  11. Qt5Core.dll
  12. Qt5Gui.dll
  13. Qt5Widgets.dll

The full deployment information for windows available at qt 5.5 doc

like image 36
Andrew Avatar answered Oct 20 '22 06:10

Andrew