C++ Shared Library Integration
MATLAB Compiler SDK™ provides two ways to deploy MATLAB functions within C++ applications:
Deploy to C++ Applications using MATLAB Data API
In this approach, you create an archive containing MATLAB functions and deploy it within a C++ application. Use the MATLAB Compiler SDK API for C++ as an interface between the C++ application and the archive containing the deployed MATLAB functions. Use the MATLAB Data API to handle data exchange between the C++ application and deployed MATLAB functions. This was in introduced in R2018a.
Deploy to C++ Applications using
mwArray
APIIn this approach, you create a C++ shared library and header file from MATLAB functions you want to deploy. Use the legacy MATLAB Compiler SDK API for C++ as an interface between the C++ application and the deployed MATLAB functions. Use the
mwArray
API to handle data exchange between the C++ application and the deployed MATLAB functions. This was introduced in R2013b.
MATLAB Runtime must be installed and setup on the machine running the C++ application.
Since MATLAB Compiler SDK provides two C++ APIs to interact with deployed MATLAB functions, the two APIs are distinguished based on the APIs used for exchanging data between the C++ application and the deployed MATLAB functions..
MathWorks® recommends using the MATLAB Compiler SDK API for C++ with the MATLAB Data API.
Categories
- Deploy to C++ Applications Using MATLAB Data API
Integrate packaged MATLAB functions into C++ applications using the MATLAB Data API for data exchange
- Deploy to C++ Applications Using mwArray API
Integrate packaged MATLAB functions into C++ applications using themwArray
API for data exchange