Create definition file for C++ library
clibgen.generateLibraryDefinition(
creates a MATLAB® Live Code definition file used to generate a MATLAB interface to the C++ library defined by
CppFiles
)CppFiles
.
The name of the definition file is
define
. For more
information about using this file, see Define MATLAB Interface for C++ Library. By
default, libName
.mlxlibName
is the name of the file specified in
CppFiles
. If you use more than one header file, then you
must specify a PackageName
argument. If you use a shared
library file, then you must specify a Libraries
argument.
Use the build
method to create the interface. You need a MATLAB-supported C++ compiler. You must build the interface library using the
same compiler that was used to build the C++ library. If your library is header-only
(does not use a shared library file), then you can choose any supported C++ compiler
to build the interface library.
clibgen.generateLibraryDefinition(
creates the file for a library with one or more shared library files.CppFiles
,'Libraries',SharedLibrary
)
clibgen.generateLibraryDefinition(
creates the file using one or more name-value pair arguments. Use this option with
any of the input argument combinations in the previous syntaxes.CppFiles
,___,Name,Value
)
Saving LibraryDefinition
object
definelibName
into a MAT-file is not supported.
Avoid non-ASCII characters in folder and file names, as some locale settings might not support those characters. For information about locale, see Locale Setting Concepts for Internationalization.
To recreate a library definition file, first delete the
define
file,
then call libName
.mlxclibgen.generateLibraryDefinition
.