How do I compile user-defined MATLAB classes using the MATLAB Compiler 4.0 (R14)?

조회 수: 28 (최근 30일)
I have created a custom MATLAB class, @Person, which I want to compile into a COM or .NET object and instantiate in my driver application. However, when I try to compile the class directly, I receive errors and the compilation fails:
??? Error executing mcc, return status = 1

채택된 답변

MathWorks Support Team
MathWorks Support Team 2012년 10월 22일
Including MATLAB objects in compiled applications, libraries, or components is supported, but has specific limitations. You cannot create MATLAB objects in the driver application and use them as an input to the component built with a MATLAB Compiler product. Likewise, you cannot use a MATLAB object as an output from a component and modify it in the driver application.
Instead, create a MATLAB function that instantiates the class and calls the desired methods. If you are calling it from the driver application, the inputs and outputs to this function must comprise supported data types that are not MATLAB class objects.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by