While building generated C code, it is showing error due to simstruc_types.h and tmwtypes.h are missing

3 vues (au cours des 30 derniers jours)
function y = BlinkLed(x)
%#codegen
x=uint8(x);
if x==uint8(1)
y=uint8(1);
else
y=uint8(0);
end
end
I created a matlab function block in simulink and generated C code through code generation. While building the generated C code in visual Studio Code, I faced the error "rtwtypes.h:20:28: fatal error: simstruc_types.h: No such file or directory", "rtwtypes.h:20:28: fatal error: tmwtypes.h: No such file or directory". Please help me building this code.
  1 commentaire
Biral Pradhan
Biral Pradhan le 5 Sep 2022
I understand you are trying to generate C code for a Simulink model and are facing errors related to two missing files. Kindly follow the below links as workarounds.
For the simstruc_types.h file, do a check if it is available in matlabroot\extern\include.

Connectez-vous pour commenter.

Réponses (0)

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