0

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
4

1 回答 1

2

WebKitWidgets 模块依赖于:

  • Qt5MultimediaWidgets.dll
  • Qt5OpenGL.dll
  • Qt5PrintSupport.dll
  • Qt5WebKit.dll
  • Qt5Multimedia.dll
  • Qt5Widgets.dll
  • Qt5Network.dll
  • Qt5Sensors.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • MSVCP100.dll 和 MSVCR100.dll
  • (内核32.dll)

这就是为什么您需要这些 DLL。如果您不想发布所有这些,请考虑删除 webkitwidgets 模块。

您可以使用依赖项步行器或 CFF 资源管理器等工具检查您的应用程序依赖项。当您遇到此类问题时,这些工具会很有帮助,您可以轻松地探索依赖关系和依赖关系的依赖关系;)

于 2014-04-07T12:50:29.707 回答