Simulink compilation doesn't find string.h

조회 수: 11(최근 30일)
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.


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.




Community Treasure Hunt

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

Start Hunting!

Translated by