Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

MATLAB Runtime Component Cache and Deployable Archive Embedding

Deployable archive data is automatically embedded directly in shared libraries by default and extracted to a temporary folder.

Automatic embedding enables usage of the MATLAB® Runtime component cache features through environment variables.

These variables allow you to specify the following:

  • Define the default location where you want the deployable archive to be automatically extracted

  • Add diagnostic error printing options that can be used when automatically extracting the deployable archive, for troubleshooting purposes

  • Tuning the MATLAB Runtime component cache size for performance reasons.

Use the following environment variables to change these settings.

Environment VariablePurposeNotes
MCR_CACHE_ROOTWhen set to the location of where you want the deployable archive to be extracted, this variable overrides the default per-user component cache location.Does not apply
MCR_CACHE_VERBOSEWhen set to any value, this variable prints logging details about the component cache for diagnostic reasons. This can be very helpful if problems are encountered during deployable archive extraction.Logging details are turned off by default (for example, when this variable has no value).
MCR_CACHE_SIZEWhen set, this variable overrides the default component cache size.The initial limit for this variable is 32M (megabytes). This may, however, be changed after you have set the variable the first time. Edit the file .max_size, which resides in the file designated by running the mcrcachedir command, with the desired cache size limit.

Note

If you run mcc specifying conflicting wrapper and target types, the archive will not be embedded into the generated component. For example, if you run:

mcc -W lib:myLib -T link:exe test.m test.c

the generated test.exe will not have the archive embedded in it, as if you had specified a -C option to the command line.

Caution

Do not extract the files within the.ctf file and place them individually under version control. Since the .ctf file contains interdependent MATLAB functions and data, the files within it must be accessed only by accessing the .ctf file. For best results, place the entire .ctf file under version control.

Was this topic helpful?