Work around for Visual Studio manifest permission denied error?

조회 수: 62 (최근 30일)
Jesse Hopkins
Jesse Hopkins 2022년 1월 31일
댓글: Jesse Hopkins 2022년 4월 16일
In a nutshell, when compiling mex files or building simulink accelerator targets, Visual Studio linker can fail with a message like
mt : general error c101008d: Failed to write the updated manifest to the resource of file "<...>_msf.mexw64". Access is denied.
Some googling of this issue seems to blame anti-virus software, as does the above answer. However, in a corporate environment, uninstalling/disabling anti-virus software is not an option. I did notice that VS has an option to disable manifest generation by specifying the /MANIFEST:NO command line option to mt.exe.
I wonder if it's possible to configure Matlab/Simulink to provide /MANIFEST:NO linker option for mex file builds and/or simulink accelerator targets? Would this cause problems in calling the mex-files?
References:
  댓글 수: 2
Karl Molnar
Karl Molnar 2022년 1월 31일
I'm using R2021b, and in the file: C:\Users\XXX\AppData\Roaming\MathWorks\MATLAB\R2021b\mex_C++_win64.xml, delete the mt command. Creating the manifest file isn't the problem. The manifest file is being created, but denied to be incorporated into the mex file. You can see the compile/linker info using the -v mex option.

댓글을 달려면 로그인하십시오.

답변 (1개)

Benjamin Thompson
Benjamin Thompson 2022년 1월 31일
See this example in the help on mex:
mex -v COMPFLAGS="$COMPFLAGS -Wall" yprime.c
Try adding /MANIFEST:NO inside the double quotes. Or maybe -MANIFEST:NO. Not sure.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by