주요 콘텐츠

C/C++ 라이브러리에 대한 MATLAB 인터페이스 작성하기

R2026b
프로그래밍 방식으로 C 또는 C++ 라이브러리에 대한 MATLAB® 인터페이스 만들기

직접 유지 관리하는 MATLAB 코드를 사용하여 C 또는 C++ 라이브러리에 대한 MATLAB 인터페이스를 빌드(퍼블리시)할 수 있습니다. 포함할 헤더와 기호를 지정하고, MATLAB이 유추할 수 없는 정의만 조정하고, 플랫폼 및 라이브러리 업데이트 전반에 걸쳐 일관되게 인터페이스를 재빌드합니다. 개괄적인 내용은 C/C++ 라이브러리에 대한 MATLAB 인터페이스를 퍼블리시하는 방법 항목을 참조하십시오.

또는 플랫폼별 인터페이스를 만드는 단계별 안내를 보려면 clibPublishInterfaceWorkflow를 호출하십시오.

MATLAB에서 라이브러리의 함수를 호출하는 방법에 대한 자세한 내용은 사전 작성된 MATLAB 인터페이스를 C/C++ 라이브러리에 사용하기 항목을 참조하십시오.

R2026b 이전: 인터페이스를 퍼블리시하는 옵션으로는 clibPublishInterfaceWorkflow를 호출하여 워크플로 스크립트를 사용하거나, clibgen.generateLibraryDefinition을 사용하여 라이브러리에 대한 정의 파일을 만드는 방법이 있습니다. 자세한 내용은 C/C++ 라이브러리에 대한 MATLAB 인터페이스를 퍼블리시하는 방법 (R2026a)을 참조하십시오.

클래스

clibgen.api.InterfaceConfiguration Specify configuration for generating MATLAB interface to C/C++ library (R2026b 이후)
clibgen.api.InterfaceDefinitionInspect, customize, and build MATLAB interface definition for C/C++ library (R2026b 이후)

함수

clibPublishInterfaceWorkflowCreate live script to publish platform-specific interface for C/C++ library (R2023a 이후)
clibgen.generateLibraryDefinition(Not recommended) Create definition file for C/C++ library
clibgen.buildInterface(Not recommended) Create interface to C/C++ library without definition file

라이브 편집기 작업

C++ 인터페이스 생성Configure and generate MATLAB interface to C/C++ library (R2023a 이후)

네임스페이스

clibgen.apiSummary of programmatic workflow objects for publishing MATLAB interface to C/C++ library (R2026b 이후)
clibgenC++ 라이브러리 기능 호출을 지원하는 MATLAB 네임스페이스 및 클래스 요약

도움말 항목

MATLAB 인터페이스 퍼블리시하기

정의 및 사용자 지정

인터페이스 공유하기

문제 해결

Build C/C++ Library Interface and Review Contents

When you build a MATLAB interface to a C/C++ library, you can review the contents of the generated interface.

C/C++ 지원의 제한 사항

MATLAB에서 지원되지 않는 C/C++ 라이브러리 기능.

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++ compiled library.

Troubleshooting Calls to C/C++ Library Functions

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

Debug C++ Library from MATLAB Interface

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