Legacy Code - Functions with arguments not working
Show older comments
Hey,
I try to build a S-Function with legacy_code, but I get a error while building with:
legacy_code('sfcn_cmex_generate', def);
the following Error:
Error using legacycode.LCT.legacyCodeImpl
Cannot find a valid argument list in the function specification:
--> void Init(int32)
Error in legacy_code (line 101)
[varargout{1:nargout}] = legacycode.LCT.legacyCodeImpl(action, varargin{1:end});
Header-File:
#ifndef __Bridge__
#define __Bridge__
void Init(int fosc);
void Init(void);
#endif
Fcn-Spec:
void Init(int32 fosc)
If I test this with the other function with no arguments, all works correctly. What am I doing wrong?
2 Comments
XingZhou Mu
on 15 Apr 2024
May I ask if you have solved this problem? I have also encountered the same problem
Answers (0)
Categories
Find more on Integrate C/C++ Code Using Legacy Code Tool 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!