Why do I get a "could not find version 7.14 of the MCR..." error when running my compiled compiled .exe?

Wrote a simple .m file to try MATLAB compiler (come with MATLAB R2010b).
After build and package, all are put into one single folder (on my computer), which contains sub-folder v714. Yet when double clicked the .exe file, got the error "could not find version 7.14 of the MCR...".
Why?

 Accepted Answer

There are really 2 things that need to happen to run an application created by the MATLAB compiler.
  1. The files for the MCR need to be in place
  2. The system path variable needs to point to those files.
The mcrinstaller command can be used from the MATLAB command line to find the mcrinstaller.exe binary. For example:
>> mcrinstaller
The WIN64 MCR Installer, version 7.14, is:
C:\Program Files\MATLAB\R2010b\toolbox\compiler\deploy\win64\MCRInstaller.exe
MCR installers for other platforms are located in:
C:\Program Files\MATLAB\R2010b\toolbox\compiler\deploy\<ARCH>
<ARCH> is the value of COMPUTER('arch') on the target machine.
It is also possible to test your application against your MATLAB install if the MATLAB Compiler is also installed. You can do this from the MATLAB command line like:
>>!myexe.exe
Or from a CMD shell as long as the PATH contains the runtime directory from your MATLAB install like:
C:\work\myexe>set PATH=C:\Program Files\MATLAB\R2010b\runtime\win64
C:\work\myexe>myexe
hello
C:\work\myexe>

4 Comments

Thanks for help but I still cannot get it work. Below is complete info:
Here is complete error message:
Could not find version 7.14 of the MCR.
Attempting to load mclmcrrt7_14.dll.
Please install the correct version of the MCR.
Contact your vendor if you do not have an installer for the MCR.
Below are files in my current active matlab folder, which is E:\djs
day2.m is my original m-file.
v714 was MCR created after I ran day2_pkg.exe
.
..
day2 (Folder )
v714 (Folder )
MCRInstaller.exe (177,310 KB)
day2.exe (163 KB)
day2.prj
day2.m
day2_pkg.exe (174,858 KB)
readme.txt
mclmcrrt7_14.dll (I even copied from c:\Program Files\MATLAB\R2010b\runtime\win32 to this folder).
day2.exe just does not run and gave same error message above. I issued !day2.exe in matlab still same error.
Answer is greatly appreciated.
Just noticed that my computer is AMD Athlon(tm) 64X2 Dual Core Processor
running Windows XP professional Version 2002 Service Pack 3
My runtime folder is win32, not win64.
Not sure if this relevant.
You need to delete mclmcrrt7_14.dll from that folder. That will definitely cause you problems. That library loads a number of others from a relative path. Those libraries won't be resolved if you move it out of runtime/win32 or runtime/win64

Sign in to comment.

More Answers (3)

Even i had the same problem but when i type mcrinstaller in command window it shows undefined function.

1 Comment

same here!
Did you found a solution for that ?
I tried using 2018a and 2012b versions as well!

Sign in to comment.

Categories

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!