Hi, I'm using Stateflow inside simulink. I used some C functions as custom code using this article, and also I want to generate a C++ code based on my model and chart using Embedded Coder. The code generates fine, but it can not be compiled because of undefined reference linker error. After some investigation, I found that there is no extern "C" guard for C header related to custom code in the C++ header of the generated code. After I added extern manually, linker error fixed.
My question, is about some configs or checkbox to use and having C custom code, while generating C++ code (embedded coder).
thanks