| MATLAB® Compiler™ | ![]() |
| On this page… |
|---|
The MATLAB® Compiler™ product was designed to work with a large range of applications that use the MATLAB® programming language. Because of this, run-time libraries are large.
If you do not have MATLAB installed on the target machine and you want to run components created by the MATLAB Compiler product, you still need to install the MCR on the target machine, whether you are a developer or end user. You have to install the MCR only once. There is no way to distribute your application with any subset of the files that are installed by the MCRInstaller.
You can install the MCR by running MCRInstaller.exe.
On platforms other than Windows®, you must also set paths and environment variables. See Directories Required for Run-Time Deployment for more information about these settings.
Note The MCR is version-specific, so make sure that you tell end users of your components which version of the MCR is required. If you are deploying .NET component applications to programmers or end users, make sure to tell them to install .NET Framework before installing the MCR. The MCRinstaller.exe must detect the presence of .NET framework on a system for it to install MCR .NET support. Alternatively, you can package .NET Framework with the component installer that you provide to them as part of your deployment package. |
Note MCRInstaller.exe has obsoleted the need for the function buildmcr or the creation of MCRInstaller.zip. See Replacement of MCRInstaller.zip and BUILDMCR Functionality for more details including complete file paths to all install programs. |
See Deploying to End Users for more information about the general steps for installing the MCR as part of the deployment process.
See also Using MCRInstaller.exe on the Command Line for more information.
You do not need to install the MCR on your machine if your machine has both MATLAB and the MATLAB Compiler product installed. The version of MATLAB should be the same as the version of MATLAB that was used to create the deployed component.
If you install the MCR on a machine that already has MATLAB on it, you must adjust the library path according to your needs.
Note To run the deployed component using MCR libraries, the MCR run-time directory must appear before the MATLAB run-time directory on the library path. To ensure that the deployed component is always run using MCR, MCR needs to be set before MATLAB in the path variable. |
Windows®. To run deployed components, <mcr_root>\<ver>\runtime\win32 must appear on your system path before matlabroot\bin\win32. To run MATLAB, matlabroot\bin\win32 must appear on your system path before <mcr_root>\<ver>\runtime\win32.
UNIX®. To run deployed components on Linux®, Linux x86-64, or Solaris™, the <mcr_root>/runtime/<arch> directory must appear on your LD_LIBRARY_PATH before matlabroot/bin/<arch>, and XAPPLRESDIR should point to <mcr_root>/X11/app-defaults. See Directories Required for Run-Time Deployment for the platform-specific commands.
To run MATLAB on Linux, Linux x86-64, or Solaris, matlabroot/bin/<arch> must appear on your LD_LIBRARY_PATH before the <mcr_root>/runtime/<arch> directory, and the XAPPLRESDIR should point to matlabroot/X11/app-defaults..
To run deployed components on Mac OS® X, the <mcr_root>/runtime/mac directory must appear on your DYLD_LIBRARY_PATH before matlabroot/bin/mac, and XAPPLRESDIR should point to <mcr_root>/X11/app-defaults.
To run MATLAB on Mac OS X or Intel® Mac®, matlabroot/bin/mac must appear on your DYLD_LIBRARY_PATH before the <mcr_root>/bin/mac directory, and XAPPLRESDIR should point to matlabroot/X11/app-defaults.
Note For Intel Mac, substitute mac in pathnames for maci. |
The MCRInstaller supports the installation of multiple versions of the MCR on a target machine. This allows applications compiled with different versions of the MCR to execute side by side on the same machine.
If multiple versions of the MCR are not desired on the target machine, you can remove the unwanted ones. On Windows, you can run Add or Remove Programs from the Control Panel to remove any of the previous versions. This can be done either before or after installation of a more recent version of the MCR, as versions can be installed or removed in any order. On UNIX®, you can manually delete the unwanted MCR.
Note The feature that allows you to install multiple versions of the MCR on the same machine is currently not supported on Mac OS X. When you receive a new version of MATLAB, you must recompile and redeploy all of your applications and components. Also, when you install a new MCR onto a target machine, you must delete the old version of the MCR and install the new one. You can only have one version of the MCR on the target machine. |
Users should always run their compiled applications with the corresponding version of the MCR. If you upgrade your MATLAB Compiler software on your development machine and distribute the recompiled application to your users, you should also distribute the corresponding version of the MCR. Users should upgrade their MCR to the new version. If users need to maintain multiple versions of the MCR on their systems, refer to Installing Multiple MCRs on the Same Machine for more information.
![]() | Deploying to End Users | Deploying a Standalone Application on a Network Drive | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |