Unable to load DLL 'mclmcrrt8_5.dll'
25 views (last 30 days)
Show older comments
Hi
I am using the Compiler SDK, building a .NET dll.
I am running a very simple test and it is failing on the first line (not even got to trying to invoke the model yet)
MathWorks.MATLAB.NET.Arrays.MWNumericArray arg1 = 5;
It bombs with exception
The type initializer for 'MathWorks.MATLAB.NET.Arrays.MWNumericArray' threw an exception.
drilling down the last inner exception is
"Unable to load DLL 'mclmcrrt8_5.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
I am using Matlab r2015a 32 bit
I know it hasn't got anything to do with how I packages the dll as it is bombing on the reference to the types in the MWArray dll (referenced from C:\Program Files (x86)\MATLAB\R2015a\toolbox\dotnetbuilder\bin\win32\v2.0\MWArray.dll)
My path has a reference to C:\Program Files (x86)\MATLAB\R2015a\runtime\win32 and i see the dll there
My simple test project (unit test project) is running on VS 2013 (.NET 4)
the test is literally these 3 lines at the moment
MathWorks.MATLAB.NET.Arrays.MWNumericArray arg1 = 5;
MathWorks.MATLAB.NET.Arrays.MWNumericArray arg2 = 4;
MathWorks.MATLAB.NET.Arrays.MWArray[] result = null;
I have seen some other posts around this topic but I have the runtime referenced correctly
Why doesn't this work?
0 Comments
Answers (1)
Walter Roberson
on 7 Aug 2015
http://www.mathworks.com/matlabcentral/answers/28452-deploying-java-package-error-failed-to-find-the-library-mclmcrrt7_16-dll#answer_42075 might possibly help
If not then use a dependency walker to check that all shared libraries required by MCR are installed.
Would you just happen to be using Windows 10? If so then there are problems with some of the Microsoft runtime libraries not being recognized by Windows 10
3 Comments
Xiaolei Hu
on 26 Aug 2015
Did you have this issue resolved? I met the same one, and am still searching for solution.
Harsheel
on 27 Aug 2015
- Make sure that the PATH to the 32-bit MCR 2015a is first (before any other MCR or MATLAB paths) in the PATH environment variable.
- Make sure that the project you build is for x86 rather than x64.
Does this help?
See Also
Categories
Find more on Deploy to .NET Applications Using MWArray API in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!