beubeu84
Hi all,
 
Hi all,
I'm using OpenPLC V3.0 Release 2025-08-11. As soon as I declare my target as an ESP32 [3.3.2], I get the following message during compilation:
error: implicit declaration of function '__GET_GLOBAL_TOTO' [-Wimplicit-function-declaration]
71 | name.value = __GET_GLOBAL_##global();\
However, when I compile for an Arduino Uno R4 WiFi, it compiles successfully. I’ve run several tests, and it seems that as soon as I declare an external variable on the ESP32, the compilation fails. I’ve taken some screenshots of my program, which you can find here:
Compilation_Error.png
Reply 0 0
thiagoralves
Try declaring the global variable in the project (SansNom) instead of in the Resources
Reply 0 0
beubeu84
Dear thiagoralves, you were right — that worked perfectly.
Could you please explain the differences between declaring variables in the project instead of in the resources? because a ot of my old projects have the variables in the ressources
Reply 0 0
thiagoralves
That's just the compiler being picky. The difference is simply the position in the code where the global variable is declared. Some toolchains don't like variables being declared in the Resources. To be safe, always declare your global variables in the project scope as they work for everyone.
Reply 0 0
beubeu84
Understood, Thanks tfor the reply 🙂
Reply 0 0
Write a reply...
Reply