Program ok in XP, but gives library error in XUbuntu?

Hi Folks,
I am having an IT adventure moving from XP to XUbuntu, and so far it has been very rewarding. One of my first important goals kicked was to compile a successful Arduino program on the Linux side, a flashing Pin13 on a Micro, and so I felt I had safely got it covered. However I have tried to compile one of my larger programs for my Mega 2560 where all I had altered was a number from 40 to 10 and found this error-

Error
/home/rob/Arduino/sketchbook/libraries/ST7735R/glcdfont.c:11:23: error: variable ‘font’ must be const in order to be put into read-only section by means of ‘attribute((progmem))’
static unsigned char font[] PROGMEM = {

It appears to be in a library that helps drive a ST7735R OLED display, in the font definition section. I did not write or alter the library so I don't understand that bit of the system very well. Being a bit shaken by this I booted back to XP and found that with the same program and libraries (apart from where they are obviously stored differently for XP & Linux, the Linux versions are drag and drop copies, ie identical) the XP system compiled and downloaded without a hitch.

My version of the the Ardunio IDE in XUbuntu is 1:1.0.5+dfsg2-2 and my IDE in XP is 1.0.05.

I have not tried to write a library and would really appreciate some assistance here, either how to fix the problem or somehow debug it to get a better idea about what is going on. Thanks in advance.

Rob

Try changing "static" to "const" in the line that gets the error.

Thanks John,

Job done :slight_smile: If you have a spare moment, can you tell me why a difference might occur between the two IDEs might trigger that error? Are there others that may pop up?

Rob

Because they use different versions of avr-gcc