MATLAB and MATLAB Runtime on Same Machine

You do not need to install MATLAB® Runtime on your machine if your machine has MATLAB installed. The version of MATLAB should be the same as the version of MATLAB that was used to create the compiled MATLAB code.

You can, however, install the MATLAB Runtime for debugging purposes.

Modifying the Path

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

  • Windows®

    To run deployed MATLAB code against MATLAB Runtime 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 MATLAB Runtime install area.

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

  • UNIX®

    To run deployed MATLAB code against MATLAB Runtime on Linux®, Linux x86-64, or the <mcr_root>/runtime/<arch> folder must appear on your LD_LIBRARY_PATH before matlabroot/runtime/<arch>.

    To run deployed MATLAB code on Mac OS X, the <mcr_root>/runtime folder must appear on your DYLD_LIBRARY_PATH before matlabroot/runtime/<arch>.

    To run MATLAB on Mac OS X or Intel® Mac, matlabroot/runtime/<arch> must appear on your DYLD_LIBRARY_PATH before the <mcr_root>/bin folder.

Was this topic helpful?