MATLAB Compiler | ![]() ![]() |
Distributing Stand-Alone Applications
To make packaging an application easier, all the necessary MATLAB run-time libraries are prepackaged into a single, self-extracting archive file. For more information about how you can use this archive, see Packaging the MATLAB Run-Time Libraries. For information about how customers who receive your application can use this archive, see Installing Your Application.
Packaging the MATLAB Run-Time Libraries
All the MATLAB run-time libraries required by stand-alone applications are prepackaged into a single, self-extracting archive file, called the MATLAB Compiler Run-Time Library Installer. Instead of including all the run-time libraries individually in your stand-alone application distribution package, you can simply include this archive file.
The following table lists the name of the archive file for both UNIX and PC systems. In the table <MATLAB>
represents your MATLAB installation directory and <ARCH>
represents your UNIX platform.
Platform
MATLAB Compiler Run-Time Library Installer
UNIX systems
<MATLAB>/extern/lib/<ARCH>/mglinstaller
PCs
<MATLAB>\extern\lib\win32\mglinstaller.exe
Installing Your Application
To install your application, your customers must
bin/<ARCH>
subdirectory to their path. This is the only MATLAB Compiler Run-Time Library subdirectory that needs to be added to the path.
On UNIX Systems
On UNIX systems, your customers run the MATLAB Compiler Run-Time Library Installer by executing the mglinstaller
command at the system prompt. Your customers can specify the name of the directory into which they want to install the libraries. By default, the installer puts the files in the current directory.
After the installer unpacks and uncompresses the libraries, your customers must add the name of the bin/<ARCH>
subdirectory to the LD_LIBRARY_PATH
environment variable. (The equivalent variable on HP-UX systems is the SHLIB_PATH
and LIBPATH
on IBM AIX systems.)
For example, if customers working on a Linux system specify the installation directory mgl_runtime_dir
, then they must add mgl_runtime_dir/bin/glnx86
to the LD_LIBRARY_PATH
environment variable.
On PCs
On PCs, your customers run the MATLAB Compiler Run-Time Library Installer by double-clicking on the mglinstaller.exe
file. Your customers can specify the name of the directory into which they want to install the libraries. By default, the installer puts the files in the current directory.
After the installer unpacks and uncompresses the libraries, your customers must add the bin\win32
subdirectory to the system path variable (PATH
).
For example, if your customers specify the installation directory mgl_runtime_dir
, then they must add mgl_runtime_dir\bin\win32
to PATH
.
![]() | Packaging Windows Applications for Distribution | Problem Starting Stand-Alone Application | ![]() |