主要内容

构建 MATLAB 的 C/C++ 库接口

要创建 MATLAB® 的 C 或 C++ 库接口,请使用 clibPublishInterfaceWorkflow 函数

要构建(发布)MATLAB 的 C 或 C++ 库接口,请调用 clibPublishInterfaceWorkflow 函数。有关概述,请参阅如何发布 C/C++ 库的 MATLAB 接口

有关从 MATLAB 调用库中函数的信息,请参阅使用预置的 MATLAB C/C++ 库接口

函数

clibPublishInterfaceWorkflowPublish interface for C/C++ library in the Live Editor (自 R2023a 起)
clibgen.generateLibraryDefinition为 C++ 库创建定义文件
clibgen.buildInterface在没有定义文件的情况下创建 C++ 库的接口

实时编辑器任务

生成 C++ 接口Generate definition file for C/C++ interface library in the Live Editor (自 R2023a 起)

命名空间

clibC++ 库接口的 MATLAB 命名空间
clibgen支持从 MATLAB 调用 C++ 库功能的命名空间和类的摘要

主题

如何发布接口

共享您的接口

疑难解答

Build C/C++ Library Interface and Review Contents

If library functionality is missing, the library might contain unsupported language features or data types.

Limitations to C/C++ Support

C/C++ library features not supported in MATLAB.

Troubleshooting C/C++ Library Definition Issues

Information for resolving errors when publishing a MATLAB interface to a C/C++ library.

Troubleshooting MATLAB Interface to C/C++ Library Run-Time Issues

Resolve unexpected run-time errors when calling functions in a published MATLAB interface to a C/C++ shared library.

Troubleshooting Calls to C/C++ Library Functions

Resolve unexpected issues when calling functions in a C/C++ shared library.

Debug C++ Library from MATLAB Interface

How to build a debug version of a MATLAB interface to a C++ library.