Legacy code Tool- Errors when trying to compile my programm
19 views (last 30 days)
Show older comments
Hello everyone,
Im trying to use legacy_code and Ive followed this process:
>> specs = legacy_code('initialize')
>> def.SourceFiles = {'SPI.c'};
>> def.HeaderFiles = {'SPI.h'};
>> def.SFunctionName = 'test';
>> legacy_code('sfcn_cmex_generate', def);
>> legacy_code('compile', def);
But when I try to compile it, I got an error message and I dont understand why or how I can solve it :
Start Compiling test
mex('test.c', 'D:\users\F04433B\Documents\MATLAB\SPI.c', '-ID:\users\F04433B\Documents\MATLAB')
test.c
d:\users\f04433b\documents\matlab\SPI.h(15) : fatal error C1083: Cannot open include file: 'Arduino.h': No such file or directory
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Compile of 'test.c' failed.
Error using mex (line 206) Unable to complete successfully.
Error in C:\Program Files\MATLAB\R2013a\toolbox\simulink\simulink\+legacycode\@LCT\compile.p>compile (line 268)
Error in C:\Program Files\MATLAB\R2013a\toolbox\simulink\simulink\+legacycode\@LCT\legacyCodeImpl.p>legacyCodeImpl (line 84)
Error in legacy_code (line 87) [varargout{1:nargout}] = legacycode.LCT.legacyCodeImpl(action, varargin{1:end});
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!