Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to prevent compilation of unused imported node code?

0
Posted

How to prevent compilation of unused imported node code?

0

When a C source file is associated to an imported operator, it is compiled even if this operator is not used. If this operator uses a type which is also not generated (not used in the SCADE model), then the C compiler stops with an error during the compilation of this C file. Since SCADE 5.0.1, o avoid such behaviour, the user should #include “macro.h” in each source file and encapsulate the C function by: #ifdef m_ …. #endif With SCADE 5.0.1, the macro.h file is always generated, without #include “macro_default.h” if this file does not exist. This #ifdef avoids compilation of unused imported node code and the C code will always compile.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.