compile error

I am just getting back into Arduino after a few years. I have been trying to get a sketch compiled but getting an error message. The sketches I am tring to get going are the example sketches with the Adafruit ST_7735 library.

Every time I try to compile and up load I get an error saying HEIGHT = height and WIDTH = width error amongst others: See below
Anything I can do to get around this?

Adrian

Arduino: 1.8.2 (Windows 10), Board: "Arduino Nano, ATmega328"

WARNING: Category '' in library LiquidCrystal is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library Servo is not valid. Setting to 'Uncategorized'
Build options changed, rebuilding all
C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7789.cpp: In member function 'void Adafruit_ST7789::init(uint16_t, uint16_t, uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7789.cpp:114:9: error: assignment of read-only member 'Adafruit_GFX::WIDTH'

WIDTH = width;

^

C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7789.cpp:115:10: error: assignment of read-only member 'Adafruit_GFX::HEIGHT'

HEIGHT = height;

^

Multiple libraries were found for "Adafruit_GFX.h"
Used: C:\Program Files (x86)\Arduino\libraries\Adafruit_GFX
Not used: C:\Program Files (x86)\Arduino\libraries\Adafruit-GFX
Multiple libraries were found for "SPI.h"
Used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Not used: C:\Program Files (x86)\Arduino\libraries\SPI
exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I think i need the sketch to tell you what is wrong.

Example sketch attached.
I have downloaded the latest Adafruit ST7735 librarywith same issue

Adrian

graphicstest.ino (10 KB)

Hi,

should your sketch use upper case WIDTH and HEIGHT if that's how its set in the Lib?

  tft.fillRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color1);

Peter

adrianfu:
I have downloaded the latest Adafruit ST7735 librarywith same issue

Have you updated Adafruit GFX Libary?
WIDTH and HEIGHT have been changed from const int16_t to int16_t. (github)

oqibidipo:
Have you updated Adafruit GFX Libary?
WIDTH and HEIGHT have been changed from const int16_t to int16_t. (github)

Thanks for replies.
Will check it out tomorrow been out all day and with flu. Every bone in body and then some hurts
Adrian