How do I compile my simple GUI or graphical application using the MATLAB Compiler?
조회 수: 47 (최근 30일)
이전 댓글 표시
When I compile my application with the following command:
mcc -m myGuiApp
I receive a lot of errors and warnings similar to these:
Warning: File: legend Line: 694 Column: 13
References to "handle" will produce a run-time error because it is an undefined function or variable.
Warning: File: legend Line: 656 Column: 8
References to "graph2d" will produce a run-time error because it is an undefined function or variable.
Warning: File: legend Line: 1705 Column: 17
The MATLAB Compiler does not currently support MATLAB object-oriented programming.
References to the method "domethod" will produce a run-time error.
Warning: File: c:\matlab6p5\toolbox\matlab\graph2d\legend.m Line: 1841 Column: 14
References to "get" require the C/C++ Graphics Library when executing in stand-alone mode.
You must specify -B sgl or -B sglcpp in order to use the C/C++ Graphics Library.
Also, if using the -W option, you must specify either the mainhg or libhg wrapper type.
A run-time error will occur if the C/C++ Graphics Library is not present when "get" is called.
I looked around in the documentation but not could determine why I receive these errors.
채택된 답변
MathWorks Support Team
2010년 1월 28일
This issue has been fixed in the MATLAB Compiler 4.0 (R14). If you are using a previous version, please read the following:
The correct way to compile an MATLAB file that uses graphics is to specify that you want to include the graphics libraries when compiling. This is done using the '-B sgl' flag with the MCC command (or '-B sglcpp' for C++):
mcc -B sgl myGuiApp
Although the warning messages above mention object-oriented programming, the correct problem is the missing graphics libraries in this case.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!