C++ Libraries in MATLAB

Directly call C++ library functionality from MATLAB®

If you have a C++ shared library that exports functionality that can be called from another application, then you can use these classes and functions directly in MATLAB. To get started, you must first build an interface to the C++ library to use to call the functionality in MATLAB. Someone who creates this interface is called a publisher. You can package the interface and share it with a MATLAB end user. For examples:

To call the C++ library functionality in MATLAB, use the prebuilt interface. For examples:

To call functions in a C shared library, use the calllib function. For information, see C Libraries in MATLAB. This feature works best with C-only libraries.

If you write C/C++ functions in MEX files, then see C++ MEX Applications or C MEX File Applications.

Related Information