Shared libraries that use the MATLAB Data API have a generic interface that uses modern C++ semantics.
The interface supports C++11 functionality and has several advantages over the
mwArray
API, including type-safety and
multithread-safety. The interface provides functions that ensure correct
initialization and termination of applications. It can be run either in-process
or out-of-process and can call functions asynchronously. For more information,
see Workflow to Integrate with a C++ Shared Library that Uses the MATLAB Data API. For
an example, see Generate a C++ MATLAB Data API Shared Library and Build a C++ Application.
mbuild | Compile and link source files against MATLAB generated shared libraries |
matlab::cpplib::initMATLABApplication | Start the MATLAB Runtime and initialize its application state |
matlab::cpplib::runMain | Execute a function with its input arguments within the main function |
matlab::cpplib::convertUTF8StringToUTF16String | Convert UTF-8 string to UTF-16 string |
matlab::cpplib::convertUTF16StringToUTF8String | Convert UTF-16 string to UTF-8 string |
matlab::cpplib::initMATLABLibrary | Initialize a library of MATLAB functions packaged in a deployable archive file |
matlab::cpplib::initMATLABLibraryAsync | Initialize a library of MATLAB function asynchronously |
matlab::cpplib::MATLABLibrary::feval | Execute a MATLAB function from a deployable archive |
matlab::cpplib::MATLABLibrary::fevalAsync | Execute a MATLAB function from a deployable archive asynchronously |
matlab::cpplib::MATLABLibrary::waitForFiguresToClose | Wait for all figures to close |
Workflow to Integrate with a C++ Shared Library that Uses the MATLAB Data API
Workflow to integrate with a C++ shared library that uses the MATLAB Data API.
Generate a C++ MATLAB Data API Shared Library and Build a C++ Application
Create a C++ MATLAB Data API shared library from MATLAB code using the Library Compiler and implement it with sample C++ driver code.
Writing C++ Driver Code Using the C++ MATLAB Data Array API
Guidelines on writing C++ driver code using the generic interface for integration with C++ shared libraries that use the MATLAB Data API.
Configure the mbuild Options File
How to configure the mbuild
options file.
MATLAB Runtime Path Settings for Development and Testing
Path settings to develop and test applications containing packaged MATLAB code.
MATLAB Runtime Startup Options
Set MATLAB Runtime options, such as -nojvm
,
-nodisplay
, or -logfile
.
MATLAB Runtime Component Cache and Deployable Archive Embedding
Override the default archive embedding behavior, and use MATLAB Runtime component cache.