TouchGFX showing undefined reference to global variable
I am new to TouchGFX, I ran into a problem that using TouchGFX 4.21.1 on STM32H743Eval 2 , I add a global variable (e.g. counter) within "USER CODE BEGIN 0", , in StartDefaultTask, add counter++ in the main.c file, follow MVP design procedure, just want to dispaly counter value in TextTArea widget, CubeIDE code compiling is ok, but when click "run simulator", it appers "C:\TouchGFXProjects\STM32H743\TouchGFX/gui/src/model/Model.cpp:13: undefined reference to `counter'
I am also using 4.18.0 of touchgfx, both have same symptom, is there any setting I missed, please help, thanks in advance.