When you try to run MalDestruct_GUI.exe, you get:
The code execution cannot proceed because Qt6Widgetsd.dll was not found.
This happens because the Qt runtime DLLs are not in the same directory as the executable or in your system PATH.
cd C:\Users\cysec\OneDrive\Desktop\MalDestruct\MalDestruct
deploy_gui.batOr:
copy_qt_dlls.batThis script will:
- Find your Qt installation
- Copy required Qt DLLs to
build\bin\ - Copy the platform plugin
- Copy MSVC runtime DLLs
set PATH=%PATH%;C:\Qt\6.9.3\msvc2022_64\bin
build\bin\MalDestruct_GUI.exeCopy these files from C:\Qt\6.9.3\msvc2022_64\bin\ to build\bin\:
Qt6Cored.dll(orQt6Core.dllfor Release)Qt6Widgetsd.dll(orQt6Widgets.dllfor Release)Qt6Guid.dll(orQt6Gui.dllfor Release)
Also copy the platform plugin:
- From:
C:\Qt\6.9.3\msvc2022_64\plugins\platforms\qwindowsd.dll - To:
build\bin\platforms\qwindowsd.dll - Create the
platformsfolder if it doesn't exist
Qt provides a tool called windeployqt that automatically copies all required DLLs:
cd C:\Qt\6.9.3\msvc2022_64\bin
windeployqt.exe C:\Users\cysec\OneDrive\Desktop\MalDestruct\MalDestruct\build\bin\MalDestruct_GUI.exeThis will:
- Copy all required Qt DLLs
- Copy platform plugins
- Copy other dependencies
- Set up the correct directory structure
set PATH=%PATH%;C:\Qt\6.9.3\msvc2022_64\bin- Press Win + X → System
- Click Advanced system settings
- Click Environment Variables
- Under System variables, find Path
- Click Edit
- Click New
- Add:
C:\Qt\6.9.3\msvc2022_64\bin - Click OK on all dialogs
- Restart any open command prompts/terminals
After copying DLLs or adding to PATH:
- Navigate to
build\bin\ - Double-click
MalDestruct_GUI.exe - It should launch without errors!
-
Check if DLLs were copied:
dir build\bin\*.dll -
Verify Qt path is correct:
dir C:\Qt\6.9.3\msvc2022_64\bin\Qt6*.dll -
Check for Debug vs Release mismatch:
- Debug build needs
*d.dllfiles (Qt6Cored.dll, Qt6Widgetsd.dll) - Release build needs regular
.dllfiles (Qt6Core.dll, Qt6Widgets.dll)
- Debug build needs
-
Use Dependency Walker:
- Download Dependency Walker
- Open
MalDestruct_GUI.exe - See which DLLs are missing
If you get "This application failed to start because no Qt platform plugin could be initialized":
- Create
build\bin\platforms\folder - Copy
qwindowsd.dll(Debug) orqwindows.dll(Release) from:C:\Qt\6.9.3\msvc2022_64\plugins\platforms\To:build\bin\platforms\
When distributing your application, you have two options:
- Copy all required DLLs to the same folder as the executable
- Users can run it without installing Qt
- Create an installer that includes Qt runtime
- More complex but professional
Copy DLLs script:
copy_qt_dlls.batDeploy with windeployqt:
C:\Qt\6.9.3\msvc2022_64\bin\windeployqt.exe build\bin\MalDestruct_GUI.exeAdd to PATH (temporary):
set PATH=%PATH%;C:\Qt\6.9.3\msvc2022_64\bin