Confused problems with no such file... Wire.h and lib_deps

Hello

i get confused problems with compile my arduino code

thats the errors

 indent preformatted text by 4 spaces

Compiling .pio\build\megaatmega2560\lib69a\Adafruit Unified Sensor\Adafruit_Sensor.cpp.o
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Encrypt_Sha1.cpp: In member function ‘virtual size_t Encrypt_SHA1::write(uint8_t)’:
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Encrypt_Sha1.cpp:89:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Encrypt_Sha1.cpp: In member function ‘virtual size_t Encrypt_SHA1::write(uint8_t*, int)’:
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Encrypt_Sha1.cpp:95:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Packet.cpp: In member function ‘int MySQL_Packet::read_lcb_int(int)’:
.pio\libdeps\megaatmega2560\MySQL Connector Arduino\src\MySQL_Packet.cpp:523:7: warning: unused variable ‘size’ [-Wunused-variable]
int size = 0;
^~~~
Compiling .pio\build\megaatmega2560\lib8d4\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_BusIO_Register.cpp.o
Compiling .pio\build\megaatmega2560\lib8d4\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_I2CDevice.cpp.o
Archiving .pio\build\megaatmega2560\lib69a\libAdafruit Unified Sensor.a
Archiving .pio\build\megaatmega2560\lib28c\libMySQL Connector Arduino.a
In file included from .pio\libdeps\megaatmega2560\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371/Adafruit_BusIO_Register.h:1:0,
from .pio\libdeps\megaatmega2560\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_BusIO_Register.cpp:1:
.pio\libdeps\megaatmega2560\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371/Adafruit_I2CDevice.h:1:10: fatal error: Wire.h: No such file or directory


  • Looking for Wire.h dependency? Check our library registry!
  • CLI > platformio lib search “header:Wire.h”
  • Web > PlatformIO Registry

#include <Wire.h>
^~~~~~~~
compilation terminated.
In file included from .pio\libdeps\megaatmega2560\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_I2CDevice.cpp:1:0:
.pio\libdeps\megaatmega2560\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371/Adafruit_I2CDevice.h:1:10: fatal error: Wire.h: No such file or directory


  • Looking for Wire.h dependency? Check our library registry!
  • CLI > platformio lib search “header:Wire.h”
  • Web > PlatformIO Registry

#include <Wire.h>
^~~~~~~~
compilation terminated.
*** [.pio\build\megaatmega2560\lib8d4\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_BusIO_Register.cpp.o] Error 1
*** [.pio\build\megaatmega2560\lib8d4\Adafruit BusIO@src-1c59a2908cd7e8f991f92381d560d371\Adafruit_I2CDevice.cpp.o] Error 1
================================================================================== [FAILED] Took 5.72 seconds ==================================================================================

and that my platformio.ini
[env:megaatmega2560]

platform = atmelavr

board = megaatmega2560

framework = arduino

lib_deps =

paulstoffregen/Ethernet@0.0.0-alpha+sha.9f41e8231b

arduino-libraries/Ethernet@^2.0.0

milesburton/DallasTemperature@^3.9.1

paulstoffregen/TimeAlarms@0.0.0-alpha+sha.c291c1ddad

thomasfredericks/Bounce2@^2.70

paulstoffregen/Time@^1.6.1

chuckbell/MySQL Connector Arduino@^1.2.0

adafruit/Adafruit Unified Sensor@^1.1.4

adafruit/Adafruit BME680 Library@^2.0.1

paulstoffregen/OneWire@^2.3.5

https://github.com/PaulStoffregen/Wire.git

https://github.com/SodaqMoja/Sodaq_SHT2x.git

https://github.com/adafruit/Adafruit_BusIO.git

lib_ignore =

Wire

i tried a lot with lib_ignore but nothing work
i not understand why compile in Ardino-IDE well and from some years in platformio too… but now nothing from my old codes work more in platformio

Regards
Achim

Why lib_ignore it when Wire is needed as a sub-dependency of Adafruit_BusIO?

Change the dependencies to

lib_deps =
    arduino-libraries/Ethernet@^2.0.0
    milesburton/DallasTemperature@^3.9.1
    paulstoffregen/TimeAlarms@0.0.0-alpha+sha.c291c1ddad
    thomasfredericks/Bounce2@^2.70
    paulstoffregen/Time@^1.6.1
    chuckbell/MySQL Connector Arduino@^1.2.0
    adafruit/Adafruit Unified Sensor@^1.1.4
    adafruit/Adafruit BME680 Library@^2.0.1
    paulstoffregen/OneWire@^2.3.5
    Wire
    https://github.com/SodaqMoja/Sodaq_SHT2x.git
    adafruit/Adafruit BusIO @ ^1.9.3

I also took the liberty of removing one of the two Ethernet libraries, they look to me as if they’d conflict.

Hello
first thanks for help !

i tried that already…
here is the result from the new building

Blockquote
In file included from .pio\libdeps\megaatmega2560\Adafruit BusIO/Adafruit_BusIO_Register.h:1:0,
from .pio\libdeps\megaatmega2560\Adafruit BusIO\Adafruit_BusIO_Register.cpp:1:
.pio\libdeps\megaatmega2560\Adafruit BusIO/Adafruit_I2CDevice.h:1:10: fatal error: Wire.h: No such file or directory


  • Looking for Wire.h dependency? Check our library registry!
  • CLI > platformio lib search “header:Wire.h”
  • Web > PlatformIO Registry

#include <Wire.h>
^~~~~~~~
compilation terminated.
*** [.pio\build\megaatmega2560\lib744\Adafruit BusIO\Adafruit_BusIO_Register.cpp.o] Error 1
In file included from .pio\libdeps\megaatmega2560\Adafruit BusIO\Adafruit_I2CDevice.cpp:1:0:
.pio\libdeps\megaatmega2560\Adafruit BusIO/Adafruit_I2CDevice.h:1:10: fatal error: Wire.h: No such file or directory


  • Looking for Wire.h dependency? Check our library registry!
  • CLI > platformio lib search “header:Wire.h”
  • Web > PlatformIO Registry

#include <Wire.h>
^~~~~~~~
compilation terminated.
*** [.pio\build\megaatmega2560\lib744\Adafruit BusIO\Adafruit_I2CDevice.cpp.o] Error 1

and here is the new platformio.ini

[env:megaatmega2560]

platform = atmelavr

board = megaatmega2560

framework = arduino

lib_deps =

arduino-libraries/Ethernet@^2.0.0

milesburton/DallasTemperature@^3.9.1

paulstoffregen/TimeAlarms@0.0.0-alpha+sha.c291c1ddad

thomasfredericks/Bounce2@^2.70

paulstoffregen/Time@^1.6.1

chuckbell/MySQL Connector Arduino@^1.2.0

adafruit/Adafruit Unified Sensor@^1.1.4

adafruit/Adafruit BME680 Library@^2.0.1

paulstoffregen/OneWire@^2.3.5

Wire

https://github.com/SodaqMoja/Sodaq_SHT2x.git

adafruit/Adafruit BusIO @ ^1.9.3

lib_ignore =

i tried also with
lib_ignore =
SD

i tried all of that what i find in platformio threads for that problme but nothing helps

i get everytime the problme withe the Wire.h

okay
now i delete and reinstalled the PCA9685-master
now looks better

but i get a other error

pio\build\megaatmega2560\src\main.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of setup’
.pio\build\megaatmega2560\src\grobot-mit-ldd-dimm-luefter-dimm-zeitschaltuhr.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio\build\megaatmega2560\src\main.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of loop’
.pio\build\megaatmega2560\src\grobot-mit-ldd-dimm-luefter-dimm-zeitschaltuhr.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\megaatmega2560\firmware.elf] Error 1

and that my platformio.ini

lib_deps =

arduino-libraries/Ethernet@^2.0.0

milesburton/DallasTemperature@^3.9.1

paulstoffregen/TimeAlarms@0.0.0-alpha+sha.c291c1ddad

thomasfredericks/Bounce2@^2.70

paulstoffregen/Time@^1.6.1

chuckbell/MySQL Connector Arduino@^1.2.0

adafruit/Adafruit Unified Sensor@^1.1.4

adafruit/Adafruit BME680 Library@^2.0.1

paulstoffregen/OneWire@^2.3.5

PCA9685-master

Wire

SPI

https://github.com/SodaqMoja/Sodaq_SHT2x.git

adafruit/Adafruit BusIO @ ^1.9.3

okay now works

i have to delete the old main.cpp