Execute S Function Builder Using Windows Subsytem for Linux?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Pratyay Pande
il 24 Ago 2021
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 Commenti
Vedere anche
Categorie
Scopri di più su Interactive Model Editing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!