1

I compiled an M-file on my laptop, obtaining an EXE file (lets say myexe.exe). I have MATLAB 2011b installed.

If I double click on myexe.exe, or if I run it from MATLAB command prompt with !myexe.exe, a window pops up saying:

Could not find version 7.16 of MCR. Attempting to load mclmcrrt7_16.dll. Please install the correct version of the MCR.

Now, MATLAB Compiler Runtime (MCR) should be a standalone set of shared libraries that enables the execution of compiled MATLAB applications or components in computers in which MATLAB is not installed. I have MATLAB on my PC so why is it complaining about MCR?

Also, I copied this file to another computer in which I do not have MATLAB but I have MCR 8.2, it gives me the same error. I thought MCR was ensuring backward compatibility. Should I copy the MCR version 7.16 from my laptop to my PC and install it (I saw it is located in C:\Program Files\MATLAB\R2011b\toolbox\compiler\deploy\win64\MCRInstaller.exe, and I saw here that 7.14 is the MCR corresponding to MATLAB 2011b)?

What about my Laptop? Do I have to install MCR version 7.16 also there? I don't get why I should.

thanks A.

Amro
  • 123,847
  • 25
  • 243
  • 454
Millemila
  • 1,612
  • 4
  • 24
  • 45
  • yes, you must install the MCR runtime that matches the version of the MATLAB Compiler used to package the application. Recent version of MCR can be [downloaded online](http://www.mathworks.com/products/compiler/mcr/) (although I don't see versions older than R2012a, but your version should be available locally on your machine like you found). Note that on the development machine where MATLAB is installed, you don't need to separately install the MCR (you might need to adjust `PATH` if you have multiple MATLAB versions installed simultaneously) – Amro Oct 20 '14 at 20:16
  • Thanks, but where do I have to point the path to? I pointed it to the location of mclmcrrt7_16.dll but it didnt work.... – Millemila Oct 21 '14 at 07:43
  • In my case (I have R2014a installed), the `PATH` contains `$MATLABROOT\runtime\win64` followed by `$MATLABROOT\bin` then `$MATLABROOT\bin\win64` (where `$MATLABROOT` is the actual root location where MATLAB is installed, e.g `C:\Program Files\MATLAB\R2014a`) – Amro Oct 21 '14 at 08:25

0 Answers0