Arduino IDE 1.5.x - directives [ IDE Bug ?]

Hi,

this fragment produces weird compile errors if NO_EEPROM is NOT defined
If I comment out char EEPROM_BUFF[1024*4] = {0}; then everithing is OK

//#define NO_EEPROM

#ifdef NO_EEPROM
char EEPROM_BUFF[1024*4] = {0};
#else

#ifdef __SAM3X8E__
    //external EEPROM
#include "I2C_eeprom.h"
I2C_eeprom i2c_EEPROM(0x50);

#else
    //build-in EEPROM
#include <EEPROM.h>
#endif


#endif

The pre-pre-processor in the IDE has never liked pre-processor directives (other than #include) at the start of the program.
You can probably fix this by adding a dummy variable:

int dummyvariable;
//#define NO_EEPROM

#ifdef NO_EEPROM
char EEPROM_BUFF[1024*4] = {0};
#else

Perfect, I works :slight_smile: