Execute S Function Builder Using Windows Subsytem for Linux?
5 次查看(过去 30 天)
显示 更早的评论
I am trying to integrate C code into my Simulink model using the S Function Builder block. I typically run matlab and Simulink on Windows 10. The C code is for *nix systems, which I have been running on Ubunutu 16.04 via Windows Subsystem for Linux (WSL). However, now I want to integrate the C code into my Simulink model using the S Function Builder block. I keep running into an error when trying to build the S Function saying "fatal error: termios.h: No such file or directory" because termios.h is designed for *nix systems. Is there a way to have the S Function builder block access WSL so I may run this C code in my Simulink model? I have not been able to find a similar header to termios.h for Windows OS.
0 个评论
回答(1 个)
Pratyay Pande
2021-8-24
Hi Andrew,
A possible workaround is to use Ubuntu 16.04 on a virtual machine, install MATLAB and execute the Simulink model there. I assumed that you are not using any Windows specific functions in your Simulink model. Also, please note that support for Ubuntu 16.04 will be dropped in the upcoming MATLAB release.
The error message may be thrown because termios.h might not have been included in the MATLAB path. Ensure that termios.h is in an accessible location in your filesystem and has been included in the MATLAB path.
As you have mentioned, it may also be the case that termios.h has been designed for *nix systems and contain some dependencies or commands that are specific to Linux systems only. Unfortunately, since S-Function Builder Block cannot access WSL, you will need to include the header file.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!