Optional Parameter not working on PIO but on arduino it’s working fine.
This is the error:
global constructors keyed to 65535_0_main.cpp.o.2165': <artificial>:(.text.startup+0x2d8): undefined reference toLiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char)’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\uno\firmware.elf] Error 1
These is the imlementation
LiquidCrystal_I2C(uint8_t lcd_addr, uint8_t lcd_cols, uint8_t lcd_rows, uint8_t charsize =
as you can see the 4th parameter is optional.
Can you provide a minimal reproducible example (
main.cpp) and more information about your environment?
I doubt it has anything to do with optional parameters. Arduino IDE and PlatformIO use the same compilers and linkers.
my sincere apology for the late reply.
that is the build error
this is the LiquidCrystal_I2C.h
Im not sure where can i find the ini for these
I am currently using windows 10 64bit,
these is my main.cpp
where can i find the platform,ini
You have the LiquidCrystal_I2C.cpp in
include/, but in this folder no code is compiled, only headers are included.
src/ or remove your own copy of LiquidCrystal and place
let me try ill get back to you
you are a legend…thanks man…
It was right there in each of the screenshots! I guess you realised that by now, as you’ve either used the
lib_deps parameter to install the library properly, or copied the
.cpp file into your
i was using my mouth not my eyes… but thanks for the hlep