Hey all.
So I want to preface this with the fact that I'm not the finest C++ programmer, so I'm posting at risk of the problem being something simple.
I've been developing over the last few months with no issues whatsoever, but for some reason I've been getting all sorts of linker errors the last few days. I've been completely unable to make sense of why they're occuring... I've boiled the project down to the simplest project I could that still reproduces the error.
At a high level, it looks like the linker thinks the function found in a '.h' file isn't defined, when in reality it's fully defined in an associated '.cpp' file.
Here is the error in question:
[Starting] Verifying sketch 'Program.ino'
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\<User>\AppData\Local\Temp\cczV9GNg.ltrans0.ltrans.o: In function `setup':
c:\Users\<User>\Documents\<Path>\Program/Program.ino:7: undefined reference to `Screen::Setup()'
C:\Users\<User>\AppData\Local\Temp\cczV9GNg.ltrans0.ltrans.o: In function `_GLOBAL__sub_I_screen':
c:\Users\<User>\Documents\<Path>\Program/Program.ino:3: undefined reference to `Screen::Screen(unsigned char, unsigned char, unsigned char)'
C:\Users\<User>\AppData\Local\Temp\cczV9GNg.ltrans0.ltrans.o: In function `_GLOBAL__sub_D_screen':
c:\Users\<User>\Documents\<Path>\Program/Program.ino:3: undefined reference to `Screen::~Screen()'
collect2.exe: error: ld returned 1 exit status
exit status 1
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"
[Error] Verifying sketch 'Program.ino': Exit with code=1
And here is a zip with the project files:
Program.zip (1.0 KB)
Thanks!