Investigate Deployed Application Failures
After the application is working on the test machine, failures
can be isolated in end-user deployment. The end users of your application
need to install the MATLAB® Runtime on their machines. The MATLAB Runtime includes
a set of shared libraries that provides support for all features of MATLAB.
If your application fails during end-user deployment, the following
questions in the column to the right may help you isolate the problem.
Note
There are a number of reasons why your application might not
deploy to end users, after running successfully in a test environment.
For a detailed list of guidelines for writing MATLAB code that
can be consumed by end users, see Write Deployable MATLAB Code
Is the MATLAB Runtime installed?
All shared libraries required for your standalone executable
or shared library are contained in the MATLAB Runtime. Installing
the MATLAB Runtime is required for any of the deployment targets.
See Install and Configure the MATLAB Runtime for
complete information.
If running on UNIX or Mac, did you update the dynamic library path after installing the
MATLAB Runtime?
Do you receive an error message about a missing DLL?
Error messages indicating missing DLLs such as mclmcrrt7x.dll
or mclmcrrt7x.so
are
generally caused by incorrect installation of the MATLAB Runtime.
It is also possible that the MATLAB Runtime is installed correctly,
but that the PATH
, LD_LIBRARY_PATH
,
or DYLD_LIBRARY_PATH
variables are set incorrectly.
For information on installing the MATLAB Runtime on a deployment
machine, see Install and Configure the MATLAB Runtime.
Caution
Do not solve these problems by moving libraries or other files
within the MATLAB Runtime folder structure. The system is designed
to accommodate different MATLAB Runtime versions operating on
the same machine. The folder structure is an important part of this
feature.
Do you have write access to the directory the application is installed in?
The first operation attempted by a compiled application is extraction
of the deployable archive. If the archive is not extracted, the application
cannot access the compiled MATLAB code and the application fails.
If the application has write access to the installation folder, a
subfolder named application-name
_mcr
is
created the first time the application is run. After this subfolder
is created, the application no longer needs write access for subsequent
executions.
Are you executing a newer version of your application?
When deploying a newer version of an executable, both the executable
needs to be redeployed, since it also contains the embedded deployable
archive. The deployable archive is keyed to a specific compilation
session. Every time an application is recompiled, a new, matched deployable
archive is created. As above, write access is required to expand the
new deployable archive. Deleting the existing application-name
_mcr
folder
and running the new executable will verify that the application can
expand the new deployable archive.