Question

I have made a Qt application. I have copied the necessary dlls to the application folder such as QT5CORE.DLL , QT5GUI.DLL , QT5WIDGETS.DLL but the application is asking for dlls such as Qt5Positioning.dll, Qt5Sensors.dll, Qt5PrintSupport.dll, Qt5Qml.dll etc even if they are not used in the program. I get such error on application start "This program cannot start because blahblah.dll is missing from your computer. Reinstalling may fix this problem."

I am getting this error in Qt5.2.1 and i am using VS 2010.

Here is the .pro file:

TEMPLATE = app
TARGET = mainwindow
DESTDIR = ../Win32/Release
QT += core network widgets gui webkitwidgets
CONFIG += release
DEFINES += WIN64 QT_DLL QT_NETWORK_LIB QT_WIDGETS_LIB QT_WEBKITWIDGETS_LIB
INCLUDEPATH += ./GeneratedFiles \
. \
./GeneratedFiles/Release
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/release
OBJECTS_DIR += release
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles
include(mainwindow.pri)
win32:RC_FILE = mainwindow.rc
Was it helpful?

Solution

The module WebKitWidgets depends on:

  • Qt5MultimediaWidgets.dll
  • Qt5OpenGL.dll
  • Qt5PrintSupport.dll
  • Qt5WebKit.dll
  • Qt5Multimedia.dll
  • Qt5Widgets.dll
  • Qt5Network.dll
  • Qt5Sensors.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • MSVCP100.dll and MSVCR100.dll
  • (KERNEL32.dll)

That's why you need those DLLs. If you don't want to ship all these, consider removing the webkitwidgets module.

You can inspect your application dependencies using tools like dependency walker or CFF explorer. These tools prove helpful when you have these kind of problems, you can easily explore dependencies and dependencies of the dependencies in your case ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top