I generated .cpp code from Simulink in Windows 10.
I copied generated files: "build_ros_model.sh" and "{filename}.tgz" to Ubuntu and run the command below.
$ ./build_ros_model.sh RobotController.tgz /catkin_ws
Then I got an error:
"{filepath}/csleepfun_windows.c:5:21: fatal error: windows.h: No such file or directory"
and the build failed.
I also tried "build and run" option, and got the same error.
How should I do to build my generated code?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2020 年 9 月 17 日

0 投票

Some part of generated C code relies on the OS which the code were generated (in this case, Windows).
Generating codes in target OS (in this case, Ubuntu) is a workaround for this issue.

その他の回答 (0 件)

カテゴリ

製品

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by