Working with the MCR

Understanding the MCR

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.

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.

Installing the MCR and MATLAB® on the Same Machine

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.

Modifying the Path

If you install the MCR on a machine that already has MATLAB on it, you must adjust the library path according to your needs.

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.

Installing Multiple MCRs on the Same Machine

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.

Deploying a Recompiled Application

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.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS