clibgen.buildInterface
Create interface to C++ library without definition file
Syntax
Description
clibgen.buildInterface(
creates a MATLAB® interface to the C++ library defined by
InterfaceGenerationFiles,Libraries=LibraryFiles)HeaderFiles and Libraries.
Note
Any class constructors, methods, data members, and functions in the
library that MATLAB cannot automatically define are dropped. To include
missing functionality, use the two-step build workflow, clibgen.generateLibraryDefinition and build functions.
The name of the interface file is
, with a
platform-specific file extension. By default, libNameInterfacelibName
is the name of the file specified in HeaderFiles.
You need a MATLAB-supported C++ compiler. You must build the interface using the same compiler that was used to build the C++ library.
clibgen.buildInterface(
for a library defined by multiple header files, source files, and, if required,
shared library files.InterfaceGenerationFiles,SupportingSourceFiles=SourceFiles)
clibgen.buildInterface(
creates an interface to the library which is completely defined by
InterfaceGenerationFiles)HeaderFiles. You can use any MATLAB-supported C++ compiler to build the interface.
If your library includes a shared library file, then you must specify a
Libraries argument.
clibgen.buildInterface(___,
generates the interface using one or more name-value arguments. Use this option
with any of the input argument combinations in the previous syntaxes. For more
information about using these arguments, see Name=Value)clibgen.generateLibraryDefinition.
Examples
Input Arguments
Name-Value Arguments
Limitations
Avoid non-ASCII characters in folder and file names, as some locale settings do not support those characters. For information about locale, see Set Locale and Display Language.
Alternative Functionality
Two-Step Build Process
Use the clibgen.generateLibraryDefinition and build
functions instead of clibgen.buildInterface to define missing
functionality in your interface.
For more information, see Build C++ Library Interface and Review Contents.