I’ve been struggling to understand why this happens and how to fix it. I will provide all the code, but I want to describe the problem. I have a variable in a file called CGlobals. I have a class called Presenter in another file. When I try to reference a variable from CGlobals, it says xxx has not been declared. If I #include CGlobals.h, it doesn’t compile because it complains of duplicate definition, even though I have the proscribed #ifndef CLOCK_GLOBALS_H stuff at the top of the library. Anyone tell me what’s going on?
I put the whole project in the attached zip file. The three relevant files are CGlobals.h, Presenter1.h, and GUIClock.ino where you can see that CGlobals.h is the first #include file. In the Presenter1.h file you will see an effort to define the WklySched strucutre that I want to import.
This is very frustrating.
GUIclock051120.zip (28.4 KB)