Can't run executable created by MCC, of m-code containing EML directives.
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler 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!