ESP32 linking error since a few days

Creating a newproject i have this kind of issue:

Compiling is write but linking failes with this messge:

Linking .pio\build\az-delivery-devkit-v4\firmware.elf
c:/users/mormic/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lC:\Users\Mormic\OneDrive\Documents\PlatformIO\Projects\TOUCH_ESP32=
c:/users/mormic/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lC:\Users\Mormic\OneDrive\Documents\PlatformIO\Projects\TOUCH_ESP32\32
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\az-delivery-devkit-v4\firmware.elf] Error 1

I removed all folders in c:\users\mormic\.platformio\packages + c:\users\mormic\.platformio\platforms + .cache

Always the same issue idem with old project which ran before.

My platformio.ini:

[env:az-delivery-devkit-v4]
platform = espressif32
board = az-delivery-devkit-v4
framework = arduino
board_build.partitions = spiffs_1_1MB.csv
lib_deps =
  bodmer/TFT_eSPI
build_flags =
  -D USER_SETUP_LOADED=1                        ; Set this settings as valid   
  -D ILI9163_DRIVER=1                           ; Select ILI9163 driver   
  -D TFT_WIDTH=240                              ; Set TFT size   
  -D TFT_HEIGHT=320   
  -D TFT_MISO=19                                ; Define SPI pins   
  -D TFT_MOSI=23   
  -D TFT_SCLK=18   
  -D TFT_CS=5   
  -D TFT_DC=4                                  ; Data/Comand pin   
  -D TFT_RST=22                                 ; Reset pin   
  -D LOAD_GLCD=1                                ; Load Fonts   
  -D TFT_BL = 32   
  -D TFT_BACKLIGHT_ON_HIGH   
  -D TOUCH_CS=14   
  -D TOUCH_IRQ=27   
  -D SPI_FREQUENCY=27000000                     ; Set SPI frequency   
  -D SPI_READ_FREQUENCY=20000000   
  -D SPI_TOUCH_FREQUENCY=2500000

Is it a upgrade issue?

Move your project out of the OneDrive folder into a normal folder on your harddrive.
Also run “pio run -t fullclean

Thanks sivar2311 a lot but those manipulations don’t solve the issue.

I’ve now this message:

Linking .pio\build\az-delivery-devkit-v4\firmware.elf
c:/users/mormic/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lG:\PlatformIO\Projects\TOUCH_ESP32=
c:/users/mormic/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lG:\PlatformIO\Projects\TOUCH_ESP32\32
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\az-delivery-devkit-v4\firmware.elf] Error 1

Is there really an equals sign in your project name? That’s not good I think.

No, there is not this equal sign in my project. It appears only is this error message.

I can edit the main.cpp if nesessary.

I add a precision: this project runs on Arduino environment

The TOUCH_ESP32= has to come from somewhere. Is it in your platformio.ini? Looks like misplaced macro.

The space between the macro name and value is also bad, it must be written together.

I just modify the macro in platformio.ini:

-D TFT_BL = 32 to -D TFT_BL=32

Eureka!.. The link completely runs.

Thanks maxgerhardt