External Header file not found during SIL simulations

3 views (last 30 days)
Unfortunately i cannot send the code i am making here, i will try to explain my problem the best i can.
I have a simulink model made of a simple matlab function block.
This matlab function block has a parameter "myParam" which value is defined in a Simulink.Parameter object in the data dictionary linked to the simulink model.
This Simulink.Parameter's Storage class is set as "ImportFromFile" linking to my file "myHeader.h".
That parameter is defined as an extern const in "myHeader.h", and its value is defined in "myHeader.c"
In my configuration file under "custom code" -> "Additional build informations" -> "source files" i wrote "myHeader.c myHeader.h"
When trying to do my SIL mode simulation on my model, i get the error :

Creating static library ./MATLAB_Function_rtwlib.a ...

ar ruvs ./MATLAB_Function_rtwlib.a MATLAB_Function.o myHeader.o myHeader.h
ar: creating ./MATLAB_Function_rtwlib.a
a - MATLAB_Function.o
a - myHeader.o
ar: myHeader.h: No such file or directory
gmke: *** [MATLAB_Function_rtwlib.a] Error 1
If i didnt provide enough information for you to understand my problem be sure to sk me for more details and i will provide them!
Thanks for your help!

Accepted Answer

Robin Mariaccia
Robin Mariaccia on 28 Feb 2020
I managed to make it work somehow.
I am not sure what i changed tho...

More Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!