Adafruit GFX: ST7789 will just not work

Trying to use a ST7789 color TFT with ESP32 (Arduino core). I have the following code:

#include <Adafruit_GFX.h> 
#include <Adafruit_ST7789.h>

#define TFT_CS   18
#define TFT_DC   23
#define TFT_MOSI 21
#define TFT_SCLK 19
#define TFT_RST  15

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

void setup() {
    tft.init(320, 240);
    tft.fillScreen(ST77XX_MAGENTA);
}

However, it fails to compile, saying:

Adafruit_SPITFT.h:254:23: error: 'drawRGBBitmap' has not been declared in 'class Adafruit_GFX'
  254 |   using Adafruit_GFX::drawRGBBitmap; // Check base class first
      |                       ^~~~~~~~~~~~~

I've seen threads about similar issues which mentioned downgrading Adafruit_GFX to 1.5.3, so i tried it, but it did not help.
Any ideas?

copied your program of post 1 and after adding a loop(){} it compiled OK
configuration
IDE 2.3.4
ESP core 3.1.3
Adafruit_GFX version 1.12.0
Adafruit ST7785 and ST7789 library 1.11.0

Tolls>Board "ESP32 Dev Module"

which particular ESP32 are you using?

My actual program also had a loop, just wanted to put an example without too much unrelated code.
The board I'm using is also set to "ESP32 Dev Module", ESP-WROOM-32.
I don't remember if I had any graphics commands for the screen in my code, so maybe some of those were causing it (I've switched to TFT_eSPI after making this thread and that works just fine)?