Undefined variables

Hi, I am attempting to transition some Arduino code. I have photos to help show my issue. The first is below: which shows a bunch of errors "identifier “{VARIABLE}” is undefined.

I was told you want to declare in a .h file using “extern” before it, yet I show that done here, in a .h file in the include folder…

And not only is that not working, but I also get a warning about the variables being “initialized and declared ‘extern’”

I cannot define it in the main file, because the variables are needed in a another .cpp file I have not yet added. So what is the problem here and how do I fix it?

extern uint8_t IRQ_1 = 3; is not valid code. You either declare it extern without an initial value or you do a definition with an initial value. The header should just have

extern uint8_t IRQ_1;
// other vars..

and in some .cpp file then, there should be

uint8_t IRQ_1 = 3;

Other .cpp files that wish to use this global variable just need to include the header and the linker will resolve the extern reference at the end…