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

27 次查看(过去 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
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