Why does Accelerator Mode not include file(s) provided in the custom code configurations?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 28 Feb. 2020
Bearbeitet: MathWorks Support Team
am 26 Mai 2020
I have a model which includes an S-function block that requires certain libraries. This libraries are included in the "Code Generation > Custom Code" section. The model is not able to link the associated files when running in accelerator mode, but works fine in rapid accelerator mode. I see an error such as:
====================== Error below ======================
fatal error C1083: Cannot open include file: 'myHeader.h': No such file or directory
Akzeptierte Antwort
MathWorks Support Team
am 26 Mai 2020
Bearbeitet: MathWorks Support Team
am 26 Mai 2020
We have identified two ways of having your required files linked while running in accelerator mode. I have listed these below:
1. Manually edit the makeInfo.includePath and makeInfo.sources section of the file "libs\timesn\rtwmakecfg.m" to reflect the following:
makeInfo.includePath = {pwd};
makeInfo.sources = {'filename1', 'filename2'};
Note: if you have a custom S-function created without the S-function builder, you may need to create the rtwmakecfg.m manually and put it in the same directory as the S-function itself. To have an additional include directory, the function would look like:
function makeInfo = rtwmakecfg()
makeInfo.Name = 'MyCustomConfig';
makeInfo.includePath = {'YOUR_PATH_NAME'};
end
2. Build the S-Function using S-Function builder block and under the libraries pane, include the following:
...\filename1
...\filename2
Note: include the full path to the source files
Note: define the input and output data types under the data properties pane
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!