2019-07-18 07:24 AM
I have declared a typedef struct data_t on my jsmn.h
after that I declared a variable DATA of type data_t on jsmn.c
and i defined N,T,C and H
then i declared DATA of type Data_t as extern on ScreenViewBase.cpp
and i try to display DATA.N on the screen
but a linker error appear : no definition for DATA referenced from ScreenViewBase.o
PS1: I do the same with time : in ScreenViewBase.cpp I declared extern RTC_TimeTypeDef sTime then I write Unicode::snprintf(Ndata, 6, "%02d",sTime.Hours ); and it work perfectly.
PS2: I work with stm32f769 and with IAR 8.32.3
2019-07-18 09:23 AM
Check symbols in .MAP file see in you have multiple instances of DATA variable.
C++ name mangling likely the driver here.