Simulink coder is attempting to create "shared header file" which is already used by Simulink in the model's local directory.

48 次查看(过去 30 天)
When I do the code generation for my simulink model 'ABC.slx', I got the error message:
Top model targets built:
Model Action Rebuild Reason ====================================================================
ABC Failed Code generation information file does not exist.
1 of 8 models built (6 models already up to date)
Build duration: 0h 1m 24.044s
Error: Simulink Coder is attempting to create shared header file 'xx.h' for data 'yy'; However, this file is already used by Simulink in the model's local directory.
To continue, rename the file for the data.

回答(1 个)

Sarthak
Sarthak 2023-8-22
Hi Sangmin Kim,
The error message “Code generation information file does not exist” typically occurs when Simulink Coder is unable to find the necessary code generation information file for a specific model. This can be when the path for the model to execute is too long or a different path is specified. As per my understanding, the issue should be resolved if the path is shortened.
Please go through this similar MATLAB Answer for your reference.
  1 个评论
sangmin kim
sangmin kim 2023-8-23
Hi Sarthak,
Thank you for your comment.
In my case, I'm trying to apply th "model reference" concept.
I found that the error occurs because the data 'yy' is declared 'extern' and the file 'xx.h' is used for some functions also.
As for the data 'yy', after the file name 'xx.sldd' changed to 'xx_data.sldd', the issue was resolved.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by