Why does Accelerator Mode not include file(s) provided in the custom code configurations?

8 vues (au cours des 30 derniers jours)
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

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 26 Mai 2020
Modifié(e) : MathWorks Support Team le 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

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by