I'm getting a compile error in my code using the LCD_I2C library. It has been working for months, but this week it began giving a compile error.
I went back to the LCD_I2C Hello_World.ino example and it too gives the error. Examining the library source code and the error, I've no idea what it's on about.
I also reinstalled the IDE without improvement. Here's the error:
"C:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\nano_33_iot" "-Ic:\\Users\\Dan\\Documents\\Arduino\\libraries\\LCD_I2C\\src" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\libraries\\Wire" "c:\\Users\\Dan\\Documents\\Arduino\\libraries\\LCD_I2C\\src\\LCD_I2C.cpp" -o "C:\\Users\\Dan\\AppData\\Local\\arduino\\sketches\\7C2B88DA410A7F53B2F3F61C8C854EDE\\libraries\\LCD_I2C\\LCD_I2C.cpp.o"
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:24:17: error: expected constructor, destructor, or type conversion before '(' token
LCD_I2C::LCD_I2C(TwoWire& wire, uint8_t address, uint8_t columns, uint8_t rows)
^
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In constructor 'LCD_I2C::LCD_I2C(uint8_t, uint8_t, uint8_t)':
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:32:103: error: invalid initialization of reference of type 'TwoWire&' from expression of type 'arduino::TwoWire'
, _address(address), _columnMax(columns-1), _rowMax(rows-1), _displayState(0x00), _entryState(0x00)
^
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In member function 'void LCD_I2C::begin(bool)':
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:49:9: error: invalid use of incomplete type 'class TwoWire'
_wire.begin();
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:49:9: error: invalid use of incomplete type 'class TwoWire'
_wire.begin();
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In member function 'void LCD_I2C::I2C_Write(uint8_t)':
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:295:5: error: invalid use of incomplete type 'class TwoWire'
_wire.beginTransmission(_address);
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:295:5: error: invalid use of incomplete type 'class TwoWire'
_wire.beginTransmission(_address);
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:296:5: error: invalid use of incomplete type 'class TwoWire'
_wire.write(output);
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:296:5: error: invalid use of incomplete type 'class TwoWire'
_wire.write(output);
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:297:5: error: invalid use of incomplete type 'class TwoWire'
_wire.endTransmission();
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:297:5: error: invalid use of incomplete type 'class TwoWire'
_wire.endTransmission();
^~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
Using library LCD_I2C at version 2.4.0 in folder: C:\Users\Dan\Documents\Arduino\libraries\LCD_I2C
Using library Wire at version 1.0 in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire
exit status 1
Compilation error: exit status 1
What board are you compiling for? It may not be supported by that library.
The Arduino nano 33 iot, it's been running for several months. Only this week it won't compile. I see nothing wrong with this line:
LCD_I2C::LCD_I2C(TwoWire& wire, uint8_t address, uint8_t columns, uint8_t rows)
I just tried with latest libraries and I get a similar error.
Arduino SAMD Boards 1.8.14
LCD_I2C by Blackhawk 2.4.0
FQBN: arduino:samd:nano_33_iot
Using board 'nano_33_iot' from platform in folder: C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Using core 'arduino' from platform in folder: C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Detecting libraries used...
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot C:\Users\bobco\AppData\Local\Temp\arduino\sketches\7B9968134652049B6DDFA0F9396E7575\sketch\Hello_World.ino.cpp -o nul
Alternatives for LCD_I2C.h: [LCD_I2C@2.4.0]
ResolveLibrary(LCD_I2C.h)
-> candidates: [LCD_I2C@2.4.0]
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src C:\Users\bobco\AppData\Local\Temp\arduino\sketches\7B9968134652049B6DDFA0F9396E7575\sketch\Hello_World.ino.cpp -o nul
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
-> candidates: [Wire@1.0]
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp -o nul
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire\Wire.cpp -o nul
Generating function prototypes...
C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire C:\Users\bobco\AppData\Local\Temp\arduino\sketches\7B9968134652049B6DDFA0F9396E7575\sketch\Hello_World.ino.cpp -o C:\Users\bobco\AppData\Local\Temp\1958990244\sketch_merged.cpp
C:\Users\bobco\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\bobco\AppData\Local\Temp\1958990244\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\nano_33_iot" "-Ic:\\Users\\bobco\\OneDrive\\Documents\\Arduino\\libraries\\LCD_I2C\\src" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\libraries\\Wire" "C:\\Users\\bobco\\AppData\\Local\\Temp\\arduino\\sketches\\7B9968134652049B6DDFA0F9396E7575\\sketch\\Hello_World.ino.cpp" -o "C:\\Users\\bobco\\AppData\\Local\\Temp\\arduino\\sketches\\7B9968134652049B6DDFA0F9396E7575\\sketch\\Hello_World.ino.cpp.o"
Compiling libraries...
Compiling library "LCD_I2C"
"C:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\nano_33_iot" "-Ic:\\Users\\bobco\\OneDrive\\Documents\\Arduino\\libraries\\LCD_I2C\\src" "-IC:\\Users\\bobco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\libraries\\Wire" "c:\\Users\\bobco\\OneDrive\\Documents\\Arduino\\libraries\\LCD_I2C\\src\\LCD_I2C.cpp" -o "C:\\Users\\bobco\\AppData\\Local\\Temp\\arduino\\sketches\\7B9968134652049B6DDFA0F9396E7575\\libraries\\LCD_I2C\\LCD_I2C.cpp.o"
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:24:17: error: expected constructor, destructor, or type conversion before '(' token
LCD_I2C::LCD_I2C(TwoWire& wire, uint8_t address, uint8_t columns, uint8_t rows)
^
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In constructor 'LCD_I2C::LCD_I2C(uint8_t, uint8_t, uint8_t)':
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:32:103: error: invalid initialization of reference of type 'TwoWire&' from expression of type 'arduino::TwoWire'
, _address(address), _columnMax(columns-1), _rowMax(rows-1), _displayState(0x00), _entryState(0x00)
^
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In member function 'void LCD_I2C::begin(bool)':
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:49:9: error: invalid use of incomplete type 'class TwoWire'
_wire.begin();
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:49:9: error: invalid use of incomplete type 'class TwoWire'
_wire.begin();
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp: In member function 'void LCD_I2C::I2C_Write(uint8_t)':
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:295:5: error: invalid use of incomplete type 'class TwoWire'
_wire.beginTransmission(_address);
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:295:5: error: invalid use of incomplete type 'class TwoWire'
_wire.beginTransmission(_address);
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:296:5: error: invalid use of incomplete type 'class TwoWire'
_wire.write(output);
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:296:5: error: invalid use of incomplete type 'class TwoWire'
_wire.write(output);
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:297:5: error: invalid use of incomplete type 'class TwoWire'
_wire.endTransmission();
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:297:5: error: invalid use of incomplete type 'class TwoWire'
_wire.endTransmission();
^~~~~
In file included from c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp:21:0:
c:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.h:38:7: note: forward declaration of 'class TwoWire'
class TwoWire;
^~~~~~~
Using library LCD_I2C at version 2.4.0 in folder: C:\Users\bobco\OneDrive\Documents\Arduino\libraries\LCD_I2C
Using library Wire at version 1.0 in folder: C:\Users\bobco\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire
exit status 1
Compilation error: exit status 1
Appears to be a problem here:
#pragma once
#ifndef _LCD_I2C_h
#define _LCD_I2C_h
#include "Arduino.h"
/**
* TwoWire class declaration is required for optionally using Wire1, Wire2.. objects
* for I2C interface.
* Forward declaration of TwoWire avoids include of Wire.h here and in user sketch.
*/
#ifdef ARDUINO_ARCH_MBED
// Special handling for Mbed platforms required.
namespace arduino {class MbedI2C;}
typedef arduino::MbedI2C TwoWire;
#else
class TwoWire;
#endif
class LCD_I2C : public Print
The workaround doesn't work, at least it doesn't today. Adding "#include <Wire.h>" in LCD_I2C.h does work though, and I can compile successfully with that modification. I don't have hardware to test on though.
#include "Arduino.h"
#include <Wire.h> // BC
/**
* TwoWire class declaration is required for optionally using Wire1, Wire2.. objects
* for I2C interface.
* Forward declaration of TwoWire avoids include of Wire.h here and in user sketch.
*/
#ifdef ARDUINO_ARCH_MBED
// Special handling for Mbed platforms required.
namespace arduino {class MbedI2C;}
typedef arduino::MbedI2C TwoWire;
#else
// BC
//class TwoWire;
#endif
I don't know if that change will have a negative impact on other platforms.
That's a good approach. I'm using the LCD_I2C HelloWorld example to exclude any issues with my own code.
In reading the LCD_I2C.h code it looks like the ARDUINO_ARCH_MBED variable may be set, though I have no idea where that would be. I've done a grep of all files under c:\users\dan\documents\arduino and find no file where that is set--only used.
It looks like the missing class would happen if that var is set:
#ifdef ARDUINO_ARCH_MBED
// Special handling for Mbed platforms required.
namespace arduino {class MbedI2C;}
typedef arduino::MbedI2C TwoWire;
#else
class TwoWire;
#endif
I get this error message, I believe the same one if my eyes aren't too blurry:
FQBN: arduino:samd:nano_33_iot
Using board 'nano_33_iot' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Using core 'arduino' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Detecting libraries used...
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot C:\Users\Dan\AppData\Local\arduino\sketches\E5D8C6BABE70CB87E2F92689451E1504\sketch\Hello_World.ino.cpp -o nul
Alternatives for LCD_I2C.h: [LCD_I2C@2.4.0]
ResolveLibrary(LCD_I2C.h)
-> candidates: [LCD_I2C@2.4.0]
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src C:\Users\Dan\AppData\Local\arduino\sketches\E5D8C6BABE70CB87E2F92689451E1504\sketch\Hello_World.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
-> candidates: [Wire@1.0]
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire C:\Users\Dan\AppData\Local\arduino\sketches\E5D8C6BABE70CB87E2F92689451E1504\sketch\Hello_World.ino.cpp -o nul
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src\LCD_I2C.cpp -o nul
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire\Wire.cpp -o nul
Generating function prototypes...
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino NANO 33 IoT" -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\nano_33_iot -Ic:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src -IC:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire C:\Users\Dan\AppData\Local\arduino\sketches\E5D8C6BABE70CB87E2F92689451E1504\sketch\Hello_World.ino.cpp -o C:\Users\Dan\AppData\Local\Temp\780627708\sketch_merged.cpp
C:\Users\Dan\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Dan\AppData\Local\Temp\780627708\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\nano_33_iot" "-Ic:\\Users\\Dan\\Documents\\Arduino\\libraries\\LCD_I2C\\src" "-IC:\\Users\\Dan\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\libraries\\Wire" "C:\\Users\\Dan\\AppData\\Local\\arduino\\sketches\\E5D8C6BABE70CB87E2F92689451E1504\\sketch\\Hello_World.ino.cpp" -o "C:\\Users\\Dan\\AppData\\Local\\arduino\\sketches\\E5D8C6BABE70CB87E2F92689451E1504\\sketch\\Hello_World.ino.cpp.o"
In file included from C:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\examples\Hello_World\Hello_World.ino:20:0:
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src/LCD_I2C.h:68:20: error: expected ')' before '&' token
LCD_I2C(TwoWire& wire, uint8_t address, uint8_t columns = 16, uint8_t rows = 2);
^
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src/LCD_I2C.h:107:5: error: reference to 'TwoWire' is ambiguous
TwoWire& _wire;
^~~~~~~
c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src/LCD_I2C.h:41:7: note: candidates are: class TwoWire
class TwoWire;
^~~~~~~
In file included from c:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\src/LCD_I2C.h:27:0,
from C:\Users\Dan\Documents\Arduino\libraries\LCD_I2C\examples\Hello_World\Hello_World.ino:20:
C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire/Wire.h:32:7: note: class arduino::TwoWire
class TwoWire : public HardwareI2C
^~~~~~~
Using library LCD_I2C at version 2.4.0 in folder: C:\Users\Dan\Documents\Arduino\libraries\LCD_I2C
Using library Wire at version 1.0 in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\libraries\Wire
exit status 1
Compilation error: exit status 1
Have gone back to the beginning to verify my ide setup isn't corrupted somehow. I can compile the WiFiServer example and it runs fine on my nano iot.
That should localize the problem to the LCD_I2C library and dependencies. I'm puzzled. I've taken my swing and whiffed.
Try searching in the packages folder of C:\Users<username>\AppData\Local\Arduino15 or the equivalent folder on your system
Hi,
Have you wound back the boards manager?
Your board may have be updated.
Not sure which one.
Thanks.. Tom...
I don't believe that the Nano 33 IOT is an mbed core, it is based on SAMD and I think uses Arduino SAMD core, but I could be wrong.
The other Nano 33 boards use a different chip (nRF52840) , which Arduino uses mbed for because they didn't already have a core.
Also mbed is going away soon, to be replaced with Zephyr. That will be fun.
Good point. I find it in mbed_rp2040\4.2.1\platform.txt
I realized it is likely a parameter passed into the compiler in my case with the nano 33 iot the similar parameters passed in are
"-DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD "
So that is not likely, or directly at least, the issue.
Still to check, the Board Manager. I do updates every time they become available, haven't been bitten before, but could be my turn.
I've now tried each of the Arduino SAMD Boards (32-bits ARM Cortex-M0+) versions from 1.8.14 back to 1.8.11 with each behaving with identical errors.
When I uninstalled the IDE and reinstalled, did that clear the libraries out, ensuring I have a fresh clean install? Looking for anywhere else a gremlin could hide...
No.
It left you with the current state of the libraries.
How to clear them out. Will deleting the libraries dir and reinstalling them work, or are there indices somewhere that will get confounded?
What is the best way to do a complete clean reinstall of the ide and libraries?
It seems that several changes were made to the library on Dec 24 2024, which causes problems probably for all SAMD boards.
If no one else wants to, I can raise an issue on the library and maybe it will get fixed.
You are correct! That fixed the problems. I don't know how to raise the issue or to whom, can you do it? Thanks for all your help!
Hi @dan39johnson .
You can report the bug to the developer by submitting an issue to the library's GitHub repository:
There is some general information about GitHub issues here:
system
Closed
July 19, 2025, 12:05am
20
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.