Simulink compilation doesn't find string.h

24 ビュー (過去 30 日間)
syl1446
syl1446 2019 年 10 月 2 日
回答済み: Chaitanya Mallela 2020 年 12 月 30 日
When trying to compile a Simulink model, I get the error: "C1083: Cannot open include file: 'string.h': No such file or directory" during the compilation of one of the sub-models. The header is located in "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" but Matlab doesn't seem to be able to find it. I've tried to add this path to the includes search path by adding it to 'Model Configuration Parameters > Simulation Target > Include directories'. I've also tried to pass it directly to the toolchain by choosing 'Specify' for "Model Configuration Parameters > Code Generation > Build configuration" and adding the path prepended by '-I' (capital i) to 'C Compiler' and 'C++ Compiler'. None of these attempts worked.
How can I tell Simulink where to look for this file ?
I use Matlab 2018b on Windows 7 with Visual C++ 2017 v15.0.
Thanks

回答 (1 件)

Chaitanya Mallela
Chaitanya Mallela 2020 年 12 月 30 日
you can specify the C header file for simulation in the Simulation Target pane of the Model Configuration Parameters dialog box.
#include <string.h>
To access C source and header files outside your working folder, list the path in the Simulation Target pane, in the Include Directories text box.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by