Skip to Main Content Skip to Search
Product Documentation

Running Your Application on Mac or Linux

Installing the MCR on Mac or Linux

See Working with the MCR for complete information on installing the MCR.

See The MCR Installer for details about how to run deployed components against specific MCR installations.

Performing a Silent Installation of the MCR on Mac or Linux

See the Installation Guide for information on silent install and other command-line options for installing the MCR.

Set MCR Paths on Mac or Linux with Scripts

When you build applications, associated shell scripts (run_application.sh) are automatically generated in the same folder as your binary. By running these scripts, you can conveniently set the path to your MCR location as opposed setting the paths manually.

Setting Paths Manually Using Environment Variables

Set the environment variables DYLD_LIBRARY_PATH (Linux and Mac) and XAPPLRESDIR (Mac only) to the values listed in Set MCR Paths for Run-Time Deployment. Alternatively, use the run scripts, discussed below.

  1. Open a terminal window.

      Note   On Mac, use the Finder to locate Terminal if you don't know where it is located.

  2. Execute the setenv commands in Set MCR Paths for Run-Time Deployment. The mcr_root is the location where you installed the MCR.

  3. Navigate to your MATLAB application and run it.

Solving Problems Related to Setting MCR Paths on Mac or Linux

Use the following to solve common problems and issues:

 I tried running SETENV on Mac and the command failed

 My Mac application fails with "Library not loaded" or "Image not found" even though my EVs are set

Running Applications on Linux Systems with No Display Console

Your compiled MATLAB applications should execute normally on a computer with no display, providing there is some graphical environment such as X11 (or a similar X-Windows compatible environment) installed.

To test whether a compiled application will run on a system with no console, attempt to install and run the MATLAB Compiler Runtime.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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