MATLAB Compiler SDK C++ Target Requirements
System and Product Requirements
System Dependencies
MATLAB® Compiler SDK™ provides two ways to deploy MATLAB functions within C++ applications:
Deploy to C++ applications using MATLAB Data API
Deploy to C++ applications using
mwArray
API
When deploying to C++ applications using the MATLAB Data API, MATLAB functions are packaged into an archive
(.ctf
) file. This archive can be deployed in C++
applications across platforms provided it does not contain any
platform-specific code or dependencies.
When deploying to C++ applications using the mwArray
API, a shared library and a header file are created which are
platform-specific.
Product Dependencies
The following products must be installed prior to installing and using MATLAB Compiler SDK:
MATLAB
MATLAB Compiler™
MATLAB functions deployed to C++ applications require MATLAB Runtime during execution. For details, see Install and Configure MATLAB Runtime.
Supported C++ Compilers
For a list of platform-specific supported C++ compilers, see Supported and Compatible Compilers on the MathWorks® website.
Data API
MathWorks provides two data APIs for handling data exchange between a C++ application and deployed MATLAB functions:
MATLAB Data API.
mwArray
API.
These data APIs are installed on your system when you install MATLAB and MATLAB Compiler SDK or MATLAB Runtime.
MATLAB Data API is shared between MATLAB Compiler SDK and MATLAB Engine. For details, see MATLAB Data API for C++.
Development Environment
Use the MATLAB desktop to author MATLAB code and MATLAB Compiler SDK to generate C++ artifacts from MATLAB code.
Use a C++ code editor to integrate the artifacts generated by MATLAB Compiler SDK with C++ applications. You can use the MATLAB desktop environment to accomplish this step.
You can also use an integrated development environment (IDE) such as Microsoft® Visual Studio® for integrating the artifacts generated by MATLAB Compiler SDK with C++ applications. For details, see Set Up Microsoft Visual Studio for C++ Development (Windows Only).
Test your application against the installed version of MATLAB that was used to generate the C++ artifacts or against MATLAB Runtime. However, during deployment you must use MATLAB Runtime.
Cross-platform Support
When deploying to C++ applications using the MATLAB Data API, MATLAB functions are packaged into an archive (.ctf
file). This archive can deployed across platforms provided it does not contain
any platform-specific code or dependencies.
When deploying to C++ applications using the mwArray
API, a
shared library and a header file are created which are platform-specific.