SOLVED - UTFT library error: variable 'SmallFont' must be const...

Hello,

I need some help to start using the Henning Karlsen's UTFT libraries.
As a newbe I read the libraries reference in the arduino main site and do like this:

  • download the .zip file;
  • extract content to my Arduino sketch folder / libraries;
  • open the UTFT_Demo_320x240.pde;
  • click on the verify icon to compile it.

But I'm having the error:
/home/renato/mySketchDir/libraries/UTFT/DefaultFonts.c:14:14: error: variable 'SmallFont' must be const in order to be put into read-only section by means of 'attribute((progmem))'

Do you have any idea?

PS: the lib site is: Electronics - Henning Karlsen

It compiled fine for me.

You could try editing /home/renato/mySketchDir/libraries/UTFT/DefaultFonts.c, and changing:

fontdatatype SmallFont[1144] PROGMEM={

to

const fontdatatype SmallFont[1144] PROGMEM={

OK dxw00d. Its runs, thanks!

I changed like your tip and compile/run it successfully.
I forgot to say that I'm using Debian and gcc 4.7.1

Hello , I am new to forum, seeking help in same matter.
I did the same trick but still it's not working.

DefaultFont.c is changed by me but not working.

Any suggestion?

Make sure you are using the latest version of UTFT(V2.81). Those problems are all dealt with.

Regards,

Graham