Contenido principal

build

R2026b

Build MATLAB interface to C++ library from clibgen.api.InterfaceDefinition object

Since R2026b

    Description

    build(idef) creates an interface file interfaceName in the folder specified by OutputFolder. The name of the interface file for library libname is libnameInterface.ext, where ext is platform-specific — .dll on Windows®, .so on Linux®, or .dylib on macOS.

    example

    Examples

    collapse all

    Build an interface to a library defined by mylib.hpp.

    icfg = clibgen.api.InterfaceConfiguration("libname",HeaderFiles="mylib.hpp",IncludePath=pwd);
    idef = clibgen.api.InterfaceDefinition(icfg);
    idef.OutputFolder = fullfile(pwd,"testlibname");
    if(idef.Buildable)
      build(idef);
    end

    Input Arguments

    collapse all

    Interface definition, specified as a clibgen.api.InterfaceDefinition object.

    Version History

    Introduced in R2026b