I am working on a library that was working fine yesterday evening but I wanted to change the name so first I backed up the whole library folder by selecting it and zipping it up and then messed with it but kept getting errors so I deleted the folder and reverted to the backup by unzipping the folder back to it's original place (this is a quick backup method I use regularly)
BUT
I am now getting errors which are silly!
This is an example of a call on the current version of the library:
DueGUI.addPanel(0,0,799,50,clrBlue,clrWhite,clrWhite,2,"Board control menu",280,8,BVS_34,visible,URNnull);
The final attribute "URNnull" was added yesterday but it was working for hours after being added....
Following being restored from the backup I am now getting the errors (actually I am getting pages of errors in pairs for each call, this is the pair relating to the 1st error):
/Users/darren/Documents/Arduino DUEGUI/libraries/UTFT/UTFT.h:294: error: expected ',' or '...' before numeric constant
AND
DueGUI_demo_01:178: error: no matching function for call to 'UTFT::addPanel(int, int, int, int, int, int, int, int, const char [23], int, int, int, int, int)'
/Users/darren/Documents/Arduino DUEGUI/libraries/UTFT/UTFT.h:301: note: candidates are: int UTFT::addPanel(word, word, word, word, long int, long int, long int, byte, String, int, int, int, bool)
My call in the sketch is calling "addPanel" with 8 ints a string and 5 ints BUT the compiler thinks that the corresponding line in the h file only has 8 ints, a string and 4 ints......
It DID the day before but since last night it has had 5 ints following the string.
The actual line in the h file is:
int addPanel(word x,word y,word xs,word ys,long colour,long borcolour,long textcolour,byte borwidth,String top,int xo,int yo,int font,bool visible,int URN);
and the corresponding line in the cpp file is:
int UTFT::addPanel(word x,word y,word xs,word ys,long colour,long borcolour,long textcolour,byte borwidth,String top,int xo,int yo,int font,bool visible,int URN){
This makes no sense as it all worked before.....
So I installed the IDE on another fresh computer this time running Windows7 rather than MacOS and with a completely fresh install I get the SAME issue!
I thought that it might be looking at an old file but if I go to the latest h file and insert a lot of lines before the error the line number of the error increases so the IDE is looking at the right file.
IF I remove the final attribute from the definition in the sketch, h file and in the cpp file the first error:
/Users/darren/Documents/Arduino DUEGUI/libraries/UTFT/UTFT.h:294: error: expected ',' or '...' before numeric constant
Stays but the other one goes away.....
This was working perfectly earlier and it's not now.... I cannot understand what on earth is wrong with it.