supotsaeea
Below compile error on ESP32 when use external variable. But no error when compile for ESP8266.




C:\Users\ASUS\OpenPLC_Editor\editor\arduino\src\POUS.c: In function 'PROGRAM0_init__':
editor\arduino\src\lib/accessor.h:71:30: error: implicit declaration of function '__GET_GLOBAL_TEST' [-Wimplicit-function-declaration]
71 | name.value = __GET_GLOBAL_##global();\
| ^~~~~~~~~~~~~
C:\Users\ASUS\OpenPLC_Editor\editor\arduino\src\POUS.c:14:3: note: in expansion of macro '__INIT_EXTERNAL'
14 | __INIT_EXTERNAL(INT,TEST,data__->TEST,retain)
| ^~~~~~~~~~~~~~~
editor\arduino\src\lib/accessor.h:71:28: error: assignment to 'IEC_INT *' {aka 'short int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
71 | name.value = __GET_GLOBAL_##global();\
| ^
C:\Users\ASUS\OpenPLC_Editor\editor\arduino\src\POUS.c:14:3: note: in expansion of macro '__INIT_EXTERNAL'
14 | __INIT_EXTERNAL(INT,TEST,data__->TEST,retain)
Reply 0 0
thiagoralves
Update your editor and it will work
Reply 0 0
supotsaeea
Update your editor and it will work
OK, I will.
Reply 0 0
supotsaeea
Update your editor and it will work
It already work.
Reply 1 0
Reply