My board is NUCLEO L432kc. I use the TextLCD.h as the lib for the lcd1602, and use the mbed-cli compile the program. The lcd1602 is initilized as follow:
TextLCD lcd(A1, A2, A3, A4, A5, A6, TextLCD::LCD16x2);
And the error information will show up
"undefined reference to TextLCD::TextLCD(PinName, PinName, PinName, PinName, PinName, PinName, TextLCD::LCDType)' $PATH/.gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/final_project.dir/main.cpp.obj: in function
TextLCD::~TextLCD()‘:
$PATH/TextLCD.h:43: undefined reference to `vtable for TextLCD’
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ERROR: CMake invocation failed!
More information may be available by using the command line option ‘-v’. "
What may be the reason for that?
The link of TextLCD.h are as follows: TextLCD - TextLCD library for controlling various LCD panel… | Mbed