Understand themclmcrrt
Proxy Layer
All application and software components generated byMATLAB®Compiler™andMATLAB Compiler SDK™need to link against only one MATLAB library,mclmcrrt
. This library provides a proxy API for all the public functions in MATLAB libraries used for matrix operations, MAT-file access, utility and memory management, and applicationMATLAB Runtime. Themclmcrrt
library lies between deployed MATLAB code and these other version-dependent libraries, providing the following functionality:
Ensures that multiple versions of theMATLAB Runtimecan coexist
Provides a layer of indirection
Ensures applications are thread-safe
Loads the dependent (re-exported) libraries dynamically
The relationship betweenmclmcrrt
and other MATLAB libraries is shown in the following figure.
The MCLMCRRT Proxy Layer
In the figure, solid arrows designate static linking and dotted arrows designate dynamic linking. The figure illustrates how themclmcrrt
library layer sits above themclmcr
andmcr
libraries. Themclmcr
library contains the run-time functionality of the deployed MATLAB code. Themcr
module ensures each bundle of deployed MATLAB code runs in its own context at run time. Themclmcrrt
proxy layer, in addition to loading themclmcr
, also dynamically loads theMX
andMAT
modules, primarily formxArray
manipulation. For more information, see the MathWorks®Support database和搜索信息rmation on theMSVC
shared library.
Caution
Deployed applications must only link to themclmcrrt
proxy layer library (mclmcrrt.lib
on Windows®,mclmcrrt.so
on Linux®, andmclmcrrt.dylib
onMacintosh). Do not link to the other libraries shown in the figure, such asmclmcr
,libmx
, and so on.