user1631: I am trying to run the test program from Adafruit, with their libraries, for an Arduino controlling a Nokia5110 display and get this error message:
Arduino: 1.5.8 (Linux), Board: "Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"

    /home/Harry/Arduino/libraries/Adafruit_GFX/glcdfont.c:9: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 = {
                           ^
    Error compiling.

Please can anyone explain this? I can happily give more details, but I am not yet sure how much is needed and the files are rather too long to include them all at this stage.

user18478: You can not change variables in PROGMEM memory.
Therefore the variable must be a const variable.
This way the compiler can check whether you try to change the value or not.

user26916: The problem is you're using an old version of the Adafruit GFX Library, which was written for a previous version of the Arduino IDE. You just need to install the latest version of the library and your problem will be solved:

Download https://github.com/adafruit/Adafruit-GFX-Library/archive/master.zip
Unzip the downloaded file.
Rename the unzipped folder Adafruit_GFX
Replace /home/Harry/Arduino/libraries/Adafruit_GFX with the folder.

If you run into any other problems after doing that I recommend trying the latest version of the Arduino IDE. The version you're using is very outdated.

1631: <p>I am trying to run the test program from Adafruit, with their libraries, for an Arduino controlling a Nokia5110 display and get this error message:</p>

<pre><code>Arduino: 1.5.8 (Linux), Board: "Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"

    /home/Harry/Arduino/libraries/Adafruit_GFX/glcdfont.c:9: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 = {
                           ^
    Error compiling.
</code></pre>

<p>Please can anyone explain this? I can happily give more details, but I am not yet sure how much is needed and the files are rather too long to include them all at this stage.</p>
 18478: <p>You can not change variables in PROGMEM memory.<br>
Therefore the variable must be a const variable.<br>
This way the compiler can check whether you try to change the value or not.</p>
 26916: <p>The problem is you're using an old version of the Adafruit GFX Library, which was written for a previous version of the Arduino IDE. You just need to install the latest version of the library and your problem will be solved:</p>

<ol>
<li>Download <a href="https://github.com/adafruit/Adafruit-GFX-Library/archive/master.zip" rel="nofollow noreferrer">https://github.com/adafruit/Adafruit-GFX-Library/archive/master.zip</a></li>
<li>Unzip the downloaded file.</li>
<li>Rename the unzipped folder Adafruit_GFX</li>
<li>Replace /home/Harry/Arduino/libraries/Adafruit_GFX with the folder.</li>
</ol>

<p>If you run into any other problems after doing that I recommend trying the latest version of the Arduino IDE. The version you're using is very outdated.</p>
