The ability to automatically include the 'rtlibsrc.h' header file in the same path as the generated code is not available in Real-Time Workshop Embedded Coder.
To workaround this issue from R2006b onwards, please use the command 'packNGo' to pack all the generated files. Using this command will automatically pick the file 'rtlibsrc.h'.
For previous product releases, read below for any possible workarounds:
To work around this issue, manually copy $MATLABROOT\rtw\c\libsrc\rtlibsrc.h file to the same directory as the generated code, where $MATLABROOT is the MATLAB installation directory on your machine which can be obtained by typing
at the MATLAB Command prompt.
Best Answer