Another irritating compile re header files

Why am I getting this compiler error:

List.h:56: error: ‘MAX_STARTS’ was not declared in this scope

CListItem m_arrayStarts[MAX_STARTS];

I have clearly defined MAX_STARTS in programstation.h
And I have included programstation.h in list.h

Tjhis has got to be another red herring where the compiler is not accurately detailing what the real problem is.

So why can’t the compiler see MAX_STARTS


#include "DateTime.h"
#include "Common.h"
#include "ProgramStart.h"
#include "TextFile.h"
#include "WifiManager.h"
#include "List.h"
#include "CString.h"
#include "Timer.h"
#include <avr/pgmspace.h>

const uint8_t MAX_STARTS = 12;
#ifndef __LIST_H_
#define __LIST_H_

#include "ProgramStation.h"

List.h (1.11 KB)

ProgramStation.h (2.16 KB)

Clear out your temporary folder. Where, exactly, that is depends on your OS.

Enable verbose mode on compiling, to see where the temporary build folder is.

Compile your code. Is ProgramStation.h actually copied to the build folder?

One of the stupidest changes that the Arduino team made was to decide that failure to find an include file was not a fatal error.