Error loading .net Assembly from a Matlab exectuable.

조회 수: 19 (최근 30일)
danielh
danielh 2017년 8월 3일
댓글: KAE 2024년 3월 13일 13:10
I am trying to compile some .m files along with a DLL in to a matlab executable using the following command:
mcc -m Interface.m -a Z:\PROJ\mydll.dll
where Interface.m loads the assembly as follows:
NET.addAssembly('Z:\PROJ\mydll.dll')
When running the exectuable, I get the following error:
"Could not load file of assembly 'file:///Z:\PROJ\mydll.dll' or one of its dependencies. Operation is not supported. (Exception from HRESEULT: 0x80131515)
Source: mscorlib"
I also tried the following combination:
NET.addAssembly('mydll.dll');
mcc -m Interface.m -a mydll.dll
In which case I get a different error message:
'mydll.dll' could not be found in the .NET Global Assembly Cache (GAC).
Previous answers suggested checking the DLL is not blocked. I checked and it is not. Any ideas how to get around this problem? Thanks!
  댓글 수: 1
KAE
KAE 2024년 3월 13일 13:10
Though you say the issue wasn't that the files were blocked, for those who want more info on that, see the answer here.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by