I receive the following error when I try to generate code for a model with a while subsystem using Real-Time Workshop:
### Building while_bug: make -f while_bug.mk ADD_MDL_NAME_TO_GLOBALS=1 gcc -c -O -ffloat-store -fPIC -DUSE_RTMODEL -DMODEL=while_bug -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -I. -I.. -I/sandbox/awarlock/Aslrtw/matlab/simulink/include -I/sandbox/awarlock/Aslrtw/matlab/extern/include -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/src -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/libsrc -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/src/ext_mode/common -I/home/awarlock/temp -I/home/awarlock/temp/while_bug_grt_rtw -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/libsrc AtomicSys.c gcc -c -O -ffloat-store -fPIC -DUSE_RTMODEL -DMODEL=while_bug -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -I. -I.. -I/sandbox/awarlock/Aslrtw/matlab/simulink/include -I/sandbox/awarlock/Aslrtw/matlab/extern/include -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/src -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/libsrc -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/src/ext_mode/common -I/home/awarlock/temp -I/home/awarlock/temp/while_bug_grt_rtw -I/sandbox/awarlock/Aslrtw/matlab/rtw/c/libsrc WhileSys.c WhileSys.c: In function `while_bug_WhileSys': WhileSys.c:46: `rt_elapseTime' undeclared (first use in this function) WhileSys.c:46: (Each undeclared identifier is reported only once WhileSys.c:46: for each fu
Best Answer