tobozo / ESP32-targz

🗜️ An Arduino library to unpack/uncompress tar, gz, and tar.gz files on ESP32 and ESP8266
Other
117 stars 15 forks source link

Build error Udpate.h missing #70

Closed olup closed 5 months ago

olup commented 5 months ago

Using platformio and:

[env:esp32-s3-devkitc-1]
platform = espressif32@6.4.0
board = esp32-s3-devkitc-1
framework = arduino
lib_ldf_mode = deep+

I get : .pio/libdeps/esp32-s3-devkitc-1/ESP32-targz/src/ESP32-targz-lib.hpp:46:12: fatal error: Update.h: No such file or directory

Any pointers on how to get this working ?

tobozo commented 5 months ago

difficult to say without seeing the code, but here are some tips:

LDF Modes: Finder ~ deep+, Compatibility ~ soft

otherwise paste the output here, especially the dependency graph

olup commented 5 months ago

Hey, thanks for your quick response.

I do have LDF Modes: Finder ~ deep+, Compatibility ~ soft

I import the lib like this:

#define DEST_FS_USES_SD_MMC
#include <ESP32-targz.h>

on top of the header file that host this part of the code. Most of my code is in separate compile unit with cpp+h files, but this part is still a simple header included in the main.cpp file - could it be a problem ?

Draft is in this branch https://github.com/olup/grigri/blob/eb98afaba244c506d7d3447f22e7002d91ec355b/software/src/WebServer/WebServer.h#L4-L5

tobozo commented 5 months ago

I did some actual testing and produced a new release (1.2.2), it's already available in the platformio library registry.

I have also extended the platformio example with lib_ldf_mod=deep+ and a very basic workflow test.

[env:esp32s3]
platform = espressif32
board = esp32-s3-devkitc-1
; Reminder: if using lib_ldf_mode deep+ or chain+, either include the undetected libraries
; from your cpp file, or add them to the lib_deps
lib_ldf_mode = chain+
lib_deps =
  SD
  FS
  SPI
  Update
  LittleFS
  ESP32-targz
tobozo commented 5 months ago

the grigri project fails to compile on linux though, I had to modify file.cpp

https://github.com/olup/grigri/blob/taggz/software/src/file/file.cpp#L1

#include "./File.h" should be #include "./file.h" (lowercase F)

olup commented 5 months ago

Great, now version compiles without me having to ad any lib_deps ✅ Thanks for the very quick update

olup commented 5 months ago

Thanks for the heads up, vscode cpp support is not perfect on refactor/renaming