Back to all issues

Issue 5745

Bug: Simulink reports error "Cannot open source file '[name].h'" in #include "[name.h]"


SubmittedProductStatus
2025-09-02Reactis for SimulinkResolved in 2025.0.1 (released Oct 03, 2025; release notes)
Resolved in 2024.2.3 (released Oct 03, 2025; release notes)

If the "Propagate set_param changes by saving the model to a temporary file" option is enabled in Edit->General and a model has an include search path set (Model Settings->Simulation Target->Include headers within Simulink) and the include path has directories relative to the model directory then Reactis will produce an error during type inference saying something like: Simulink reported the following error during type inference : Error while parsing custom code for model 'ccaller_matpath'. Fix the errors in your custom code or disable 'Import custom code' if your custom code has incompatibilities. If your custom code uses C++ language syntax, ensure that 'Language' is set to 'C++' in Model Configuration Parameters > Simulation Target. In line 1 of the custom code, cannot open source file "testfunction.h": | #include "testfunction.h"