MATLAB C/C++ code generation error

1.1k views Asked by At

I'm trying to build my simple Stateflow/Simulink design into C/C++, but I get this error. I used code generation before, but I don't know for this design it shows errors. Does anybody know what is wrong? And here, is my model.

enter image description here

1

There are 1 answers

0
cyberdyne On BEST ANSWER

In the Model toolbar select Simulation->Model configuration parameters. You have not setted the Code replacement library (CRL) in the Code Generation->Interface pane. Set it to C89/C90, C99, etc.

PS: If you want to use the code generation you must set a Fixed-step solver (with its Step time) in the Solver pane.