Problem in compiling the C++ code created by simulink Embedded Coder Quick Start "rtw_continuous.h" file not included
11 views (last 30 days)
Show older comments
Hello every one.
I have simulated a simple project in Simulink Matlab using a few blocks. Then I get the C++ code from Embedded Coder Quick Start to compile and get Hex file to load on a micro-controller. When I try to compile the files this error occurs reporting that "rtw_continuous.h" and "rtw_solver.h" do not exist. I checked the folders that C source codes are in and could not find these files.
It would be nice of you if help me.
Thanks
0 Comments
Answers (1)
Aabha
on 24 Apr 2025
The error you are facing with the ‘rtw_continuous.h’ and ‘rtw_solver.h’ header files not being found, typically occurs when the model configuration is set to support continuous time, and the generated code requires these files but cannot locate them. These files are not generated, they are shipped with Simulink Coder/ Embedded Coder.
Most probably, there might be an issue with the configuration of the model, which is set while generating code. Try checking the option ‘Support: continuous time’ in the ‘Model Configuration’ pane, as mentioned in the documentation link below:
Another workaround is to manually locate the header files. You can use the following commands in the MATLAB Command Window to locate the header files:
cd (matlabroot)
cd simulink/include/
After locating the file, manually paste it into the location where Embedded Coder is generating all other files.
I hope this helps.
0 Comments
See Also
Categories
Find more on Simulink 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!