Can't run executable created by MCC, of m-code containing EML directives.
이전 댓글 표시
Hi,
My project is intended to be compiled by mcc into an executable, on linux using version r2009b, though I'm having the following problem with later versions as well.
I'm trying to start using the embedded matlab compiler (emlmex) on some of its m-files for improving running time, and it seems to work well when run from the matlab command line, without further compilation by mcc.
Some of the functions I have are used both as m-files called from m-files, and as m-files compiled into the eml mex file, so they contain eml directives such as eml.target, eml.extrinsic, eml.varsize etc. It all works well from the matlab command line, but after I compile the project with mcc and try to run the executable, it fails with messages such as:
??? Undefined variable "eml" or class "eml.target".
Code for example - comp_test.m
function [ ] = comp_test( )
if isempty(eml.target)
disp('Regular');
else
disp('EML');
end
end
Compile with: mcc -m comp_test.m Then run: comp_test
or run_comp_test.sh <path to matlab installation >
and get the message: ??? Undefined variable "eml" or class "eml.target".
How do I solve this problem?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!