Undefined reference to structures

They’re not definitions but declarations in the sense of the C++ language.

Example:

my_header.h

#ifndef MY_HEADER_H
#define MY_HEADER_H

extern int my_global_var;

#endif

With

main.cpp

#include <Arduino.h>
#include "my_header.h"

void setup() {
    Serial.begin(115200);
    Serial.println(my_global_var);
}

will fail, my_global_var is just declared but never defined and will throw a undefined reference to error.

There must be e.g. a

my_header.cpp

#include "my_header.h"

//definition with 0 initialization
int my_global_var = 0;

//or: implicitly 0
//int my_global_var;