This is just a quick note so that web searches for a similar problem find a solution. Seemingly out of the blue, I started getting random errors of the form below when compiling C++ applications in Windows:

mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "c:/mvcompile/bin/win32\_debug/wavenis.exe". Access is denied.

It didn’t happen with every link, but with every second or so attempt. The problem was tracked down to the Anti-virus program. Turning off the Anti-Virus stopped the problem from occurring. I tried used the advanced settings of the AV program to exclude the executable build directory but that didn’t resolve the problem. The workaround in place for now is to run the Cygwin sync command before the mt.exe call in the build system. This stops the problem from occurring. Presumably there’s a fault in the handling of executables that are updated and then opened by some other process.