Use of size_t in Simulink legacy C code
5 views (last 30 days)
Show older comments
I'm using Simulink's legacy_code tool to wrap C code into S-functions. This works fine, except when the legacy code uses the size_t type as part of its interface (i.e. as the type of one if its arguments or its return value). It seems that legacy_code does not support size_t (see the documentation). Here's the error message I'm getting:
The data type "size_t" is neither a built-in data type, nor defined by a Simulink.AliasType, Simulink.NumericType, Simulink.Bus object, or an enumerated data type in the base workspace.
Since the actual type of size_t depends on the compiler I would like to keep the function declaration I use with legacy_code portable. How can I achieve this?
0 Comments
Answers (0)
See Also
Categories
Find more on Integrate C/C++ Code Using Legacy Code Tool 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!