[CMake] Errors when writing manifest
Petr Kmoch
petr.kmoch at gmail.com
Thu Jul 6 08:45:14 EDT 2017
Hi all.
I'm on Windows and I'm building my CMake project using MSVC. When I select
Visual Studio as the CMake generator, everything works perfectly. However,
when I use either the NMake or Ninja generator (in a properly configured
command prompt), most of my DLL linking steps fail with the following error:
C:/Program Files (x86)/Windows Kits/8.1/bin/x64/mt.exe : general error
c101008d: Failed to write the updated manifest to the resource of file
"path\to\the.dll". The operation failed.
Re-running the exact same command (`nmake` or `ninja`) without doing
anything else occasionally solves the problem (it seemed to me it was
solved more often with NMake than with Ninja, but I can't be sure), but now
I've reached a point where all remaining DLLs consistently fail to link due
to the manifest issue.
I'd be happy to try to debug/locate the issue myself, but since the error
message I get is so wonderfully unhelpful, I don't know *how* to look into
it, or even where to start. Would anyone have any ideas how to look what
the issue could be?
My googling came up with two possibilities: a race with an antivirus for
checking the binary file, or write protection on the output directory. I've
verified that the directory in not write-protected, and it's in a location
which is excluded from AV checks. And anyway, if either of these were the
cause, I'd expect the exact same errors when using the Visual Studio IDE to
build, but such errors *never* happen there.
Any ideas?
Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170706/5953d6e3/attachment-0001.html>
More information about the CMake
mailing list