MATLAB: Am I unable to use Simulink Accelerator 6.0 (R14) and Simulink Accelerator 6.1 (R14SP1) on a model that has an S-function block

acceleratorbuildererrors-functionsimulinkSimulink Accelerator

I open a blank Simulink model and put the S-function Builder block in the diagram. I then used this S-function Builder block to construct and compile the S-function.
Then in my main model I used the regular S-function block with the DLL obtained from the S-function Builder block. I can run my main model in normal mode, but when I try to run it in accelerated mode, I get the following error:
Error using ==> accelbuild_private
Error using ==> slbuild
Error using ==> RTW.makertw.make_rtw
Error using ==> rtw_c
Error(s) encountered while building model "name of the model"

Best Answer

This bug has been fixed in Release 2006b (R2006b). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in Simulink Accelerator 6.0 (R14) and Simulink Accelerator 6.0.1 (R14SP1) in the way that it handles .dll files obtained from the S Function Builder block.
To work around this issue, use the S-function Builder block instead of the S-function block in your main model.