Unable to load DLL 'mclmcrrt8_5.dll'
26 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Walter Roberson
2015-8-7
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 个评论
Xiaolei Hu
2015-8-26
Did you have this issue resolved? I met the same one, and am still searching for solution.
Harsheel
2015-8-27
- 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?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!