I use Platformio to write code for the arduino platform.
I defined a struct variable in an .ino file like this ,
struct rot_t
{
…
}el;
and then declared it with ‘’‘extern struct rot_t el’’’ in a .h file, and then used this struct in another .ino file(had already included .h file) , but an error was reported during compilation, prompting “error: invalid use of incomplete type 'struct …”
I searched a lot of webpages, and they said that extern struct…is available, but I didn’t find out why it went wrong。
Who can help me?
This needs the complete code to be able to say anything about the error…