Why do I get the error ‘Undefined function or variable detect while running standalone application compiled from Linux terminal?
Show older comments
I am trying to run MATLAB compiled code which includes the 'detect.m'
function from the Computer Vision System Toolbox. It gave the following
error - ‘Undefined function or variable 'detect'.'
I am compiling using mcc from Linux Terminal and tried to add the path of the detect.m file to the Makefile and compiled it
again. It gave the following error – 'Could not determine type of the
MATLAB file detect.m'. Please make sure that you are compiling MATLAB
Program files.'
When I compile program from applicationCompiler, it works fine. Perhaps because my main file has dependency on another file(load_my_data.m) which calls trainACFObjectDetector()and detect() from Computer Vision Toolbox.
When the directory where load_my_data.m reside is added to MATLAB search PATH, and I compile program from application compiler, everything works fine. But when I use the same mcc command and compile from terminal, I get the undefined function error.
How to make it work when compiling from terminal?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!