Why do I receive a compilation error about undefined function or variable "handle" or "graph2d" with MATLAB Compiler?

When compiling my application with:
mcc -v -m myapp.m
I receive the following errors:
References to "handle" will produce a run-time error because it is an undefined function or variable.
References to "graph2d" will produce a run-time error because it is an undefined function or variable.

 채택된 답변

These errors occur because your application is using graphics, but you have not told MCC that you want to compile a graphics application.
The compile command you should use is:
mcc -v -B sgl myapp.m
This will eliminate these errors.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

제품

릴리스

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by