How do I compile user-defined MATLAB classes using the MATLAB Compiler 4.0 (R14)?
18 views (last 30 days)
Show older comments
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
Accepted Answer
MathWorks Support Team
on 22 Oct 2012
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 Comments
More Answers (0)
See Also
See Also
Categories
Find more on MATLAB Compiler SDK in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!