Does it say exit status 1 at the end or does it say something like;
Sketch uses 6484 bytes (2%) of program storage space. Maximum is 253952 bytes.
Global variables use 426 bytes (5%) of dynamic memory, leaving 7766 bytes for local variables. Maximum is 8192 bytes.
I used 1.8.13, no errors compiles OK
I used 2.0.3 compiles OK and shows the candidate 1, 2 BUT they are NOT errors!
In file included from C:\Temp.arduinoIDE-unsaved2024617-7212-1ix97q4.vxg2\sketch_jul17a\sketch_jul17a.ino:2:0:
C:\Users\MAIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h: In function 'uint8_t readReg(uint8_t, const void*, size_t)':
C:\Users\MAIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
uint8_t requestFrom(int, int);
^~~~~~~~~~~
C:\Users\MAIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
uint8_t requestFrom(uint8_t, uint8_t);
^~~~~~~~~~~
Sketch uses 6540 bytes (2%) of program storage space. Maximum is 253952 bytes. Global variables use 430 bytes (5%) of dynamic memory, leaving 7762 bytes for local variables. Maximum is 8192 bytes.
Just like @jim-p, I can successfully compile your sketch for a Mega (IDE 1.8.19). And the warnings disappear if I change #define address 0x23 to const uint8_t address = 0x23;; this however does not mean that the 'exit status 1' will disappear for you.
Please enable verbose output during compilation in file/preferences. Do a verify/compile and post the full results here if it fails (using code tags).