Does anyone know why these errors occur and fails to compile? I understand that there are multiple SD libraries but the compiler is stating that only one of them are used.
Could you take me through the top 5 errors. The top 2 always appear but it compiles perfectly. The third, fourth and fifth have only just appeared.
I think the crash is due to errors three, four and five above the multiple SD library error/warning.
I’d add all of my code on here but there are 12 files (.ino, .h & .cpp) and there are a couple of thousand lines of code.
/Users/alexweir/Library/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(PhotoLib.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/PhotoLib.cpp:52: multiple definition of `z'; /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(CYD_Music_Photo_Station.ino.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/CYD_Music_Photo_Station.ino:52: first defined here
/Users/alexweir/Library/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(PhotoLib.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/PhotoLib.cpp:52: multiple definition of `y'; /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(CYD_Music_Photo_Station.ino.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/CYD_Music_Photo_Station.ino:52: first defined here
/Users/alexweir/Library/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(PhotoLib.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/PhotoLib.cpp:52: multiple definition of `x'; /Users/alexweir/Library/Caches/arduino/sketches/C857E1CEB535A5EF872F006E306DDD1B/sketch/objs.a(CYD_Music_Photo_Station.ino.cpp.o):/Users/alexweir/Documents/Arduino/CYD_Music_Photo_Station/CYD_Music_Photo_Station.ino:52: first defined here
/Users/alexweir/Library/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: warning: _floatdidf.o: missing .note.GNU-stack section implies executable stack
/Users/alexweir/Library/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
collect2: error: ld returned 1 exit status
Multiple libraries were found for "SD.h"
Used: /Users/alexweir/Library/Arduino15/packages/esp32/hardware/esp32/3.3.0/libraries/SD
Not used: /Users/alexweir/Library/Arduino15/libraries/OLD_SD
Not used: /Users/alexweir/Documents/Arduino/libraries/SD
exit status 1
Compilation error: exit status 1
UPDATE: Just realised that there are multiple definitions of x, y and z