Simulink compilation doesn't find string.h

21 vues (au cours des 30 derniers jours)
syl1446
syl1446 le 2 Oct 2019
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

Réponses (1)

Chaitanya Mallela
Chaitanya Mallela le 30 Déc 2020
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.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by