Generate C++ Interface
R2026bDescription
The Generate C++ Interface task lets you configure and generate an interface definition object for a MATLAB® interface to a C/C++ library. This task accomplishes one step in the workflow to publish an interface. The Generate C++ Interface task automatically generates MATLAB code for your live script.
The task generates MATLAB code that you can reuse or modify as part of a programmatic interface definition workflow.
Using this task, you can, for example:
Specify the type of files in the C/C++ library.
Select a C/C++ compiler.
Name the interface library. For example, to call functions in library
libnamefrom MATLAB, use theclib.libnamenamespace.Generate an interface definition object.
Display contents of the interface.
These configuration inputs can also be specified programmatically when generating interfaces.
Use Generate C++ Interface to generate an interface for your current platform. To generate interfaces for other platforms, use this task on the specific platform.
Open the Task
Use the Generate C++ Interface task as part of the
workflow to publish a MATLAB interface for a C/C++ library. One approach to use this task is
to call the clibPublishInterfaceWorkflow function, which incorporates this Live Editor task
into the steps of the publish workflow. This task is typically used in combination with the
steps to generate, build, and test the interface.