Exception when initialize dll in c# generated by MATLAB Compiler

后端 未结 1 1150
北恋
北恋 2020-12-20 10:37

I used the MATLAB Compiler to generate a .NET Assembly with a very little MATLAB code:

function output_arg = extest( input_arg1,input_arg2 )
             


        
相关标签:
1条回答
  • 2020-12-20 11:02

    Try adding this before the class definition

    [assembly: MathWorks.MATLAB.NET.Utility.MWMCROption("-nojit")]
    

    Also make sure that the .NET version you use for assembly is the same or lower than the one used for your Visual Studio project.

    Another solution might be adding the path of the MATLAB runtime (e.g. C:\Program Files\MATLAB\MATLAB Runtime\v92\runtime\win64) to the PATH Environment Variable.

    If none of these helps, have a look here and here, you might have a 64/32 bit mismatch.

    0 讨论(0)
提交回复
热议问题