I am trying to build qt6 on windows, however, it report error while cmake --build .
:
cmd.exe /C "cd . && D:\un-setup\cmake\bin\cmake.exe -E vs_link_dll --intdir=qtbase\src\gui\CMakeFiles\Gui.dir --rc=C:\PROGRA~2\WINDOW~4\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WINDOW~4\10\bin\100220~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\Gui.rsp /out:qtbase\bin\Qt6Guid.dll /implib:qtbase\lib\Qt6Guid.lib /pdb:qtbase\bin\Qt6Guid.pdb /dll /version:6.4 /machine:x64 /debug -DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE && cd ."
MT: command "C:\PROGRA~2\WINDOW~4\10\bin\100220~1.0\x64\mt.exe /nologo /manifest qtbase\bin\Qt6Guid.dll.manifest /outputresource:qtbase\bin\Qt6Guid.dll;#2" failed (exit code 0x1f) with the following output:
mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "qtbase\bin\Qt6Guid.dll".
I searched that, the reason is target dll (Qt6Guid.dll) is locked by some other program, probably virus software (source: mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ... Access is denied). So I have tried:
- I disabled my only virsus software windows defender in my computer. It still report the same error.
- Use processmonitor to monitor the whole build process, and I still failed to find the which one locks the dll file.
I still find that there is another resolution: in VS GUI, set embed manifest to no. However I am using cmake, then How can I pass the setting (no embed manifest) through configure? Currently my configure option is (in build dir under Qt6 source code)
../configure.bat -prefix d:\Qt6
If it's not possible to set the embed manifest setting to NO
using CMake, how can I disable windows defender totally?