Why do I get "identifier is undefined" and "expected an expression" errors when using the Simulink Code Importer tool?
I am trying to import code using the Simulink Code Importer tool, or its graphical wizard, documented here:
https://www.mathworks.com/help/releases/R2023a/simulink/code-importer.html
https://www.mathworks.com/help/releases/R2023a/simulink/ug/import-custom-code-using-the-simulink-code-importer-wizard.html
When doing so, I get errors that look like the following:
Failed to parse custom code.
Caused by:
"/path/to/my_header.h", line L: error: identifier "namespace" is undefined
| namespace my_ns {
| ^
"/path/to/my_header.h", line L: error: expected a ";"
| namespace my_ns {
| ^
"/path/to/my_impl", line M: error: identifier "using" is undefined
| using foo = my_template<baz>;
| ^
"/path/to/my_impl", line M: error: identifier "my_template" is undefined
| using foo = my_template<baz>;
| ^
"/path/to/my_impl", line M: error: expected an expression
| using foo = my_template<baz>;
| ^
"/path/to/my_impl", line N: error: expected a ";"
| template
Why is this happening? I know the code is valid, I can compile it manually without any issues.
Accepted Answer
More Answers (0)
Categories
Find more on Embedded Coder 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!