Unsolved windeployqt.exe not copying all required DLLs but also adds unnecessary files
-
I'm currently testing my application in a Windows 7 virtual machine (32bit) while the system the application was built on (the host) is a 64bit Windows 10 with Qt 5.7 32bit version. The reason - ship the application to a colleague of mine who lives in another city and doesn't know a thing about Qt or any of that software stuff.
After getting strange errors and trying to work my way through the results
dependencies walker
delivered I found that Qt actually provides a tool to create aready-to-deploy
version of a given Qt application.I gave it a go:
C:\Users\USER> C:\Qt\5.7\mingw53_32\bin\windeployqt.exe .\Documents\Projects\Project1\Prototypes\RawDataVisualizer\build\RDV.exe
It did its magic, copied a bunch of stuff and that was it. Or so I thought:
- my application requires
Qt5OpenGL.dll
as well asQt5PrintSupport.dll
however these two DLLs were not copied with the rest as dependencies - my application requires
Qt5Svg.dll
yetimageformats->qsvg.dll
seems not to be required to run it (I'm not familiar with this deployment stuff since I have always executed my Qt applications on platforms where Qt SDK was installed hence I have no idea what this library is for...) - inside
imageformats
there are actually a lot of libraries includingqtiff.dll
,qjpeg.dll
etc. none of which are something that I need (in theQRC
file in my project I have 2 SVG files and a bunch of PNGs)
There are a couple of other small things but I hope you get the picture.
Now the documentation states:
Qt libraries can be added by passing their name (-xml) or removed by passing
the name prepended by --no- (--no-xml). Available libraries: bluetooth clucene concurrent ...This solves the first issue I'm having that is the missing print support and OpenGL are my fault. However the amount of extras that are copied without me saying so is quite the amount.
Is this some built-in behaviour of the tool or am I missing something when looking at the quite small list of options available for the command prompt?
- my application requires
-
Hi,
It's surprising that Qt5OpenGL is not deployed however it's pretty normal that all the image format plugins are. After all, impossible for any tool to know what image format you will be specifically using.
qtiff, qjpeg and qsvg are plugin so if not present, it won't make the application crash, that will just reduce the number of image format you'll be able to handle.
What modules are you exactly using in your application ?
-
Hi and thanks for your reply! I'm using
Qwt
(which has a bunch of dependencies on its own),core
,gui
andwidget
. TheQt5PrintSupport
is probably added internally due to me using aQPlainTextEdit
with rich text (HTML
formatted) inside. As for the images - my application has no feature that involves loading some sort of an image outside the ones that are included in theQRC
(PNG files). TheQt5Svg
dependency is probably due toQwt
. -
I think most of the surprising dependencies comes for Qwt. Other than that, you can also check with a too like Dependency Walker what your application is currently linked against.