建造MATLABInterface to C++ Library
clibgen
包裹构建(publish) a MATLAB interface to a C++ library, seeSteps to Publish a MATLAB Interface to a C++ Library.
有关MATLAB库中调用函数的信息,请参见Use Prebuilt MATLAB Interface to C++ Library.
Functions
clibgen.generateLibraryDefinition |
Create definition file for C++ library |
clibgen.buildInterface |
Create interface to C++ library without definition file |
软件包
clibgen Package |
Summary of packages and classes to support calling C++ library functionality fromMATLAB |
Topics
如何发布界面
- What Types of Files Define Your Library?
How to set the arguments to theclibgen.generateLibraryDefinition
function. - Steps to Publish a MATLAB Interface to a C++ Library
Outline for publishing an interface to a C++ library. - 构建C ++库的界面的要求
来自MATLAB的外部,共享C ++库中调用功能的要求。 - Distribute MATLAB Interface to C++ Library
How to share your MATLAB interface with MATLAB users.
特定于平台的库文件的例子
- Header File and Import Library File on Windows
This example creates a MATLAB interface to a C++ library with an import library file
matrixOperations.lib
.- STEP 1:在Windows上生成界面
- 第2步:Define Missing Constructs
- 步骤3:建造Interface
- 第4步:Call Library Functions on Windows
- Header File and Shared Object File on Linux
This example creates a MATLAB interface to a C++ library with a shared object file
libmwmatrixOperations.so
. - 标题文件和MacOS上的动态共享库文件
This example creates a MATLAB interface to a C++ library with a dynamic shared library file
libmwmatrixoperations.dylib
.
由标题/CPP源文件定义的库的示例
- Header and CPP Source Files
This example creates a MATLAB interface to a C++ library defined in source files
matrixOperations.hpp
和matrixOperations.cpp
. - Header-Only HPP File
This example creates a MATLAB interface to a C++ library defined in a header file
school.hpp
.
Define and Customize
- Define MATLAB Interface for C++ Library
Generate and edit the MATLAB
MLX
library definition file to customize and define the interface. - Publish Help Text for MATLAB Interface to C++ Library
Provide documentation for end-users of a MATLAB interface to a C++ Library.
- C ++到MATLAB数据类型映射
Correspondence of MATLAB data types to C/C++ types. - Lifetime Management of C++ Objects in MATLAB
MATLAB在MATLAB接口中创建的C ++共享库中创建的C ++对象的内存规则。 - Initialize Pointer Members of C++ Structures for MATLAB Interface to Library
验证C ++类构造函数初始化指针成员。
Troubleshooting
建造C++ Library Interface and Review Contents
If library functionality is missing, the library might contain unsupported language features or data types.
C/C++ library features not supported in MATLAB.
Information for resolving error when publishing a MATLAB interface to a C++ library.