'MWMCR::EvaluateFunction Error - Cannot find mwvision_builtinimpl.dll when calling MATLAB function from ASP.NET
I am getting the below error when calling my MATLAB function from ASP.NET. I compiled my function using the library compiler and have added the dll as an assembly to my ASP project. See error -
... MWMCR::EvaluateFunction error ... Loading C:\Program Files\MATLAB\R2021b\bin\win64\builtins\vision_builtins\mwvision_builtinimpl.dll failed with error: The specified procedure could not be found. : state not recoverable: state not recoverable.
My MATLAB function includes functions from the Computer Vision Toolbox and the Statistics + ML toolbox. These functions are: base64decoder, bagOfFeatures, imread, predict. From what I have read these functions should be compliable.
Am I missing a step during the compilations to add the built in functions? Any suggestions would be great!
Solution 1:[1]
So, that "MWMCR" error is coming from the Matlab Runtime, which is the "headless" Matlab runtime library that executes "compiled" Matlab code. ("MWMCR" stands for "MathWorks Matlab Component Runtime", the old name for the Matlab Runtime.) But that path to C:\Program Files\MATLAB\R2021b\bin\win64\builtins\vision_builtins\mwvision_builtinimpl.dll is the path to the regular Matlab installation's Vision Toolbox.
You'll probably need to modify your ASP project to reference the library in its location in the Matlab Runtime, such that at run time it tries to load and call it from there instead of regular Matlab. Not sure exactly how to do that with ASP.NET.
It seems unusual to have your ASP.NET custom code directly referencing a Matlab Toolbox DLL. Do you really need to do that? Usually one has your M-code call normal Matlab Toolbox M-code-level functions, and rely on the Matlab or Matlab runtime execution engines to link to the toolbox's internal DLLs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrew Janke |
