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.

 Respuesta aceptada

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.

Más respuestas (0)

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Productos

Versión

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by