MATLAB: Mex Error: undeclared identifier What does this mean

MATLABmex compiler

Prompt please. I want to make mex from csfunc.c, but the compiler gives out errors, why?
>>mex csfunc.c
Error csfunc.c: 71 undeclared identifier `USE_DEFAULT_SIM_STATE'
Warning csfunc.c: 71 possible usage of USE_DEFAULT_SIM_STATE before definition
Etc. still it is a lot of errors

Best Answer

This looks like Bug#661855. Install the patch to fix the issue.