Command to build GUI:
cmake --build build --target MalDestruct_GUI --config ReleaseOr using the batch script:
rebuild_gui.batThe GUI target (MalDestruct_GUI) doesn't appear in Visual Studio's build menu because:
- CMake configuration failed - When Qt isn't found, CMake fails at line 13 (
find_package(Qt6 REQUIRED ...)) - Targets aren't created - If CMake configuration fails, no targets are created, so Visual Studio only shows what was successfully configured
- CMake cache issue - Visual Studio might be using an old cache where Qt wasn't found
Make sure CMAKE_PREFIX_PATH points to your MSVC Qt installation:
{
"name": "CMAKE_PREFIX_PATH",
"value": "C:/Qt/6.9.3/msvc2022_64",
"type": "PATH"
}Option A: Delete CMake Cache
cd C:\Users\cysec\OneDrive\Desktop\MalDestruct\MalDestruct
rmdir /s /q build
mkdir buildThen reopen Visual Studio - it will reconfigure automatically.
Option B: Reconfigure in Visual Studio
- Go to Project → CMake Settings for MalDestruct
- Click Save (even without changes)
- This triggers CMake reconfiguration
- Check View → Output → Show output from: CMake for errors
After successful configuration:
- In Solution Explorer, expand CMake Targets
- You should see:
- ✅
MalDestruct_Console - ✅
MalDestruct_GUI
- ✅
- Right-click MalDestruct_GUI in Solution Explorer
- Select Build
cd build
cmake --build . --target MalDestruct_GUI --config Releasecd C:\Users\cysec\OneDrive\Desktop\MalDestruct\MalDestruct
rebuild_gui.batcd C:\Users\cysec\OneDrive\Desktop\MalDestruct\MalDestruct\build
cmake --build . --target MalDestruct_GUI --config ReleaseIf GUI target still doesn't appear, check CMake output:
- View → Output
- Show output from: CMake
- Look for:
- ✅
-- Configuring done(success) - ❌
CMake Error(failure) - ❌
Could not find Qt6(Qt not found)
- ✅
-- The CXX compiler identification is MSVC 19.44.35222.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler
-- Check for working CXX compiler - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Qt6: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: C:/.../build
If you see -- Found Qt6: TRUE, both targets should appear!