0
votes

So I have a MATLAB program that I made and compiled in Matlab R2011b. Now I want to distribute the compiled version. I understand the user will have to install MCR on their computers to run my program. My question is: will it make a difference if this user already has some other version of MATLAB installed on his system. I checked MATLAB help and this was written

"Windows. To run deployed components against the MCR install, mcr_root\ver\runtime\win32|win64 must appear on your system path before matlabroot\runtime\win32|win64.

To run deployed components against the MCR install, mcr_root\ver\runtime\win32|win64 must appear on your system path before matlabroot\runtime\win32|win64.

If mcr_root\ver\runtime\arch appears first on the compiled application path, the application uses the files in the MCR install area.

If matlabroot\runtime\arch appears first on the compiled application path, the application uses the files in the MATLAB Compiler installation area."

So does each user has to change his system paths as instructed or will my program work even without this change?

2
You might be better asking the Mathworks tech support this question. You pay for Matlab, might as well get something extra for your money.High Performance Mark

2 Answers

0
votes

Yes, if the target machine has a version of Matlab installed things will likely not work as expected. I say likely as if you have the the same version of Matlab installed on the target machine some things might work ok.

To avoid all of this you must ensure the MCR appears first on the path.

To run the application on the MCR on your local development machine you should make sure the MCR path appears before Matlab's path.

0
votes

I can talk just from the viewpoint of my own experience:

Part 1, matlab + MCR of the same version

I think, this is just a recommendation... I never cared about it, and I never had problems with it...

It would work, and you, most probably, won't notice any difference. I've just changed those records in PATH upside-down, and my compiled app is still working.

Part 2, several MCRs of different version

Multiple MCRs, say, R2010b and R2012b won't interfere. Tested 100+ times. So, unexperienced end user, who don't have Matlab, won't have to edit PATH.