Hello. I would like help in a problem I have using "extern".
I had a cpp file (say Font.cpp) containing a constant array like
Code:
const uint8_t SmallFont[1144] ={ ....}
and I wanted to use this in a main.cpp file
Code:
extern uint8_t SmallFont[];
someFunction(SmallFont);
However I got an error saying "Undefined symbol"
My question is how to correctly use extern to be able to use the array...
---------------------------------------------------------------------------
I seldom use extern. I solved the problem above by programming the way I always do:
Copy paste all the data to a h file: Font.h and then including that file in main.cpp
that solves everything but I am wishing to learn the other way (using extern)
thanks