Integrating compiled MATLAB functions into a C or C++ application requires you to use a combination of APIs. MATLAB Compiler SDK™ uses APIs to initialize the MATLAB Runtime, load the compiled MATLAB functions into the MATLAB Runtime, and manage data that is passed between the C or C++ code and the MATLAB Runtime. The compiler generates some of the APIs based on the signatures of the compiled functions. MATLAB Runtime provides other APIs that are consistent for all applications.
To integrate MATLAB functions with your application code see Call a Shared Library.
mbuild | Compile and link source files against MATLAB generated shared libraries |
mclmcrInitialize | Initializes the MATLAB Runtime proxy library |
mclInitializeApplication | Set up application state shared by all MATLAB Runtime instances created in current process |
mclTerminateApplication | Close MATLAB Runtime-internal application state |
<library>Initialize[WithHandlers] | Initialize MATLAB Runtime instance associated with library |
<library>Terminate | Free all resources allocated by MATLAB Runtime instance associated with library |
mwArray | Class used to pass input/output arguments to C++ functions generated by MATLAB Compiler SDK |
mwException | Exception type used by the mwArray API and the C++ interface functions |
mwString | String class used by the mwArray API to pass string data as output from certain methods |
mclRunMain | Mechanism for creating identical wrapper code across all platforms |
mclIsMCRInitialized | Determine if MATLAB Runtime has been properly initialized |
mclWaitForFiguresToDie | Enable deployed applications to process graphics events, enabling figure windows to remain displayed |
mclGetLastErrorMessage | Last error message from unsuccessful function call |
mclGetLogFileName | Retrieve name of log file used by MATLAB Runtime |
mclIsJVMEnabled | Determine if MATLAB Runtime was launched with instance of Java Virtual Machine (JVM) |
mclIsNoDisplaySet | Determine if -nodisplay mode is enabled |
Integrate a C/C++ Shared Library into an Application
This example shows how to call a C++ shared library built with MATLAB Compiler SDK from a C++ application.
To use a MATLAB Compiler SDK generated shared library in your application:
Creating and distributing C shared libraries
Integrate C++ Shared Libraries
Creating and distributing C++ shared libraries
Call MATLAB Compiler SDK API Functions from C/C++
Using MATLAB Compiler SDK generated interface functions
Use Multiple Shared Libraries in Single Application
Use multple generated shared libraries in a single C/C++ application
Configure the mbuild Options File
Configuring a supported C/C++ compiler to work with MATLAB Compiler SDK
Call COM Objects in Visual C++ Programs
How to integrate a COM object into a Visual C++® program
MATLAB Runtime Path Settings for Development and Testing
Path settings for machines where you want to develop and test applications that contain compiled MATLAB code
Recommendations on memory management
MATLAB Runtime Startup Options
Set MATLAB Runtime options, such as -nojvm
, -nodisplay
,
or -logfile
Understand the mclmcrrt Proxy Layer
All application and software components generated by MATLAB
Compiler™ and MATLAB
Compiler SDK need
to link against only one MATLAB library, mclmcrrt
.
MATLAB Runtime Component Cache and Deployable Archive Embedding
How to override the default archive embedding behavior and how to use MATLAB Runtime component cache