OLED extension for ESP8266

Hi all, I have hopefully a quick question, any advices or helps would be much appreciated!
I am trying to find a mind+ extension that makes OLED and ESP8266 work together, but I failed so I am developing the extension myself and I am pretty new to this. I tried u82g library and developed the extension according to the required format, however, I am getting a bunch of “…undefined reference to….” error when I compiled a sample code that uses this extension. Below is the code being compiled, it seems no problem to me:
==============
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
// Main program start
void setup() {
u8g2.begin();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.setFontDirection(0);
u8g2.setCursor(0, 0);
u8g2.print("hello");
u8g2.sendBuffer();
}
void loop() {
}
===============
I am not able to attached the entire extension because of the file size. Below is the error I am getting:
===============
/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text._ZN4U8G25writeEh[_ZN4U8G25writeEh]+0x0): undefined reference to `u8g2_DrawGlyph'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2::write(unsigned char)':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:331: undefined reference to `u8g2_DrawGlyph'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x4): undefined reference to `u8g2_font_ncenB08_tr'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x10): undefined reference to `u8x8_InitDisplay'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x14): undefined reference to `u8g2_ClearDisplay'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x18): undefined reference to `u8x8_SetPowerSave'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x1c): undefined reference to `u8g2_SetFont'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x20): undefined reference to `u8g2_SetFontDirection'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.setup+0x24): undefined reference to `u8g2_SendBuffer'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `setup':
C:\Users\hange\AppData\Local\DFScratch\cache/dfrobot.ino.cpp:13: undefined reference to `u8x8_InitDisplay'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2::initDisplay()':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:119: undefined reference to `u8g2_ClearDisplay'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2::setPowerSave(unsigned char)':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:130: undefined reference to `u8x8_SetPowerSave'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2::setFont(unsigned char const*)':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:269: undefined reference to `u8g2_SetFont'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2::setFontDirection(unsigned char)':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:271: undefined reference to `u8g2_SetFontDirection'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `setup':
C:\Users\hange\AppData\Local\DFScratch\cache/dfrobot.ino.cpp:19: undefined reference to `u8g2_SendBuffer'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache/dfrobot.ino.cpp:21: undefined reference to `u8x8_ascii_next'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.startup._GLOBAL__sub_I_u8g2+0x18): undefined reference to `u8x8_utf8_init'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o:(.text.startup._GLOBAL__sub_I_u8g2+0x1c): undefined reference to `u8g2_Setup_ssd1306_i2c_128x64_noname_f'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `Print::Print()':
C:\Program Files (x86)\Mind+\Arduino\hardware\dfrobot\esp8266\cores\esp8266/Print.h:46: undefined reference to `u8x8_utf8_init'
c:/program files (x86)/mind+/arduino/hardware/tools/esp8266/xtensa-lx106-elf-gcc/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\hange\AppData\Local\DFScratch\cache\dfrobot.ino.cpp.o: in function `U8G2_SSD1306_128X64_NONAME_F_HW_I2C::U8G2_SSD1306_128X64_NONAME_F_HW_I2C(u8g2_cb_struct const*, unsigned char, unsigned char, unsigned char)':
C:\Users\hange\AppData\Local\DFScratch\extensions\keithliu-rocketkit-thirdex\arduinoC\libraries\Keith_SSD1306/U8g2lib.h:1696: undefined reference to `u8g2_Setup_ssd1306_i2c_128x64_noname_f'
Link error
==================================
Any helps on fixing the code, or link to existing extension would be very helpful!
Any existing extension that allow me show text on an I2C connected OLED with ESP8266 will help me too. Any helps would be much appreciated!

To test whether the issue is from your extension setup or the library itself, do this:
Open the Arduino IDE.
Go to Tools → Board → Select your ESP8266 board (like NodeMCU or Wemos D1).
Go to Sketch → Include Library → Manage Libraries.
Search for U8g2 and install the official one by Oliver Kraus.
Copy-paste your test sketch again:
#include <Wire.h>
#include <U8g2lib.h>
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
void setup() {
u8g2.begin();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.setCursor(0, 10);
u8g2.print("hello");
u8g2.sendBuffer();
}
void loop() {
}
If this compiles and uploads to your ESP8266 in Arduino IDE — the library is fine, and the issue is with your Mind+ extension setup.

Thank you for replying ahsrab.rifat
Yes, I tried it on Arduino IDE and it works. I am quite sure that there is something wrong with the extension and am trying to figure what wrong is it.