Why do I get an error when trying to compile STRFIND into a stand-alone program using the MATLAB Compiler?
Show older comments
Why do I get an error when trying to compile STRFIND into a stand-alone program using the MATLAB Compiler?
When I try to compile a file containing STRFIND into a stand-alone executable using the MATLAB compiler, I get the following message:
Warning: No M-function source available for "strfind", assuming
function [varargout] = strfind(varargin)
NOTE: This will produce a link error in stand-alone code
unless you provide a hand-written definition for this function.
Undefinedfirst referenced
symbol in file
mlfNStrfind test.o
ld: fatal: Symbol referencing errors. No output written to test
mbuild: link of 'test' failed.
??? Error using ==> mbuild
Unable to complete successfully
??? Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable (specify the -v option for more information).
The simple file that I tried to compile is:
function a = test
b = 'hello';
a = strfind(b,'l')
and I compiled it using MSVC and the following command:
mcc -m test.m -v
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!