I am trying to do SIL testing for my Simulink model. Right now I am testing only one subsystem. I have followed all the steps instructed on Mathwork websites/videos. When the code is being built to perform SIL i get the following error " Fatal error C1083: Cannot open include file: 'stddef.h': No such file in directory.
Ive also tried SIL on other models of mine and I get a similar error, it's always some header file missing. In one of my models Cannot open include file: 'string.h': No such file in directory.
The model I tried was a simple PID controller.
On another note, If i try to generate code using embedded coder I have no Issues.
although my main aim is SIL testing.
Any help to resolve this would be greatly appreciated.

 採用された回答

Gowthami
Gowthami 2023 年 4 月 24 日

0 投票

Hello Rahul,
This error message appears to be caused by an issue with the installation of Microsoft Visual Studio 2017, which is being used to compile the C++ code for simulating the model in Accelerator mode.
Two different methods to resolve this error message are to:
1. Switch to the 'MinGW' compiler using the following command -
mex -setup
Check that your Simulink model also shows MinGW (Model Configuration Parameters > Code Generation > Toolchain > Underneath "Automatically locate an installed toolchain").
2. Try fully uninstalling and reinstalling Visual Studio 2017.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Simulink Compiler についてさらに検索

製品

リリース

R2022b

タグ

質問済み:

2023 年 4 月 18 日

回答済み:

2023 年 4 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by