Arduino IDE ver 2.0.0 compile error, but not with ver 1.8.19

When executing a sketch verify/compile in IDE ver 2.0.0 I am getting an error, whereas in ver 1.8.19 for the exact same sketch I am not. It involves a library. I did not copy the verbose on compile option as it exceeds the text limit.

Ver 2.0.0

c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::reset()':
c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp:167:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)':
c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp:201:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::read_bit()':
c:\Users\jax20\OneDrive\Documents\Arduino\libraries\OneWire\OneWire.cpp:229:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "SD.h"
  Used: C:\Users\jax20\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\SD
  Not used: C:\Users\jax20\AppData\Local\Arduino15\libraries\SD
exit status 1

Compilation error: exit status 1

I'm not familiar with the setup for ESP family.

Your options as far as I can see:

  1. Check the versions of the board packages that you installed for each of the IDEs and use the same one for IDE2.0 as you in 1.8.19
  2. Modify the offending libraries.

Your topic has been moved to a more suitable location on the forum. Once you have managed to install the IDE and have it running, Installation and Troubl;eshooting is not the correct category; this is far more a programming question.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.