Question

I'm a bit of a beginner to C# and I've recently built a Windows Form Application GUI which executes a MATLAB function in much the same way as the answer presented here. So essentially using the Process.Start method to run the MATLAB function in the background.

This works fine with a 32-bit compiled MATLAB function, however compiling the function as a 64-bit executable leads to an error when executing from the WFA GUI - "Could not find version 8.2 of the MCR. Attempting to load mclmcrrt8_2.dll."

If I run the compiled function outside of the WFA GUI I have no problems. So it seems that the WFA cannot execute 64-bit processes, is there a workaround for this?

Thanks for any help.

Was it helpful?

Solution

You cannot have both MATLAB and MCR installed on the same machine and consistently run at deployed app.

I have not had any luck if both x32 and x64 MCR are installed, but you can have different version of the MCR installed, although that's not optimum.

If you have an x64 MCR deployed MATLAB, you must use x64 in your c# app.

This is not clearly documented, and these are from my experience deployed the same MATLAB base as a COM DLL, an x32 .NET assembly, and an x64 C++ shared library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top