Compilation error using "setBackgroundFillMethod"
Closed this issue · 1 comments
Hello Guys,
I like this Library and got it to render Font pretty well so far.
Now I am trying to use the setBackgroundFillMethod() function to set the background fill method of an OpenFontRender instance, but I am encountering compilation errors.
Here's the code snippet I tried:
render.setBackgroundFillMethod(BgFillMethod::Block);
And I also attempted:
render.setBackgroundFillMethod(OpenFontRender::BgFillMethod::Block);
For the first example using "BgFillMethod::Block," the error message is:
c:/users/XXXXX/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\XXXXX\AppData\Local\Temp\arduino\sketches\85F2AE1913F559FC9EDFB4035A9B5E91\sketch\objs.a(GFX_LilygoTest.ino.cpp.o):(.literal._Z4loopv+0x48): undefined reference to OpenFontRender::setBackgroundFillMethod(BgFillMethod)'
For the second example using "OpenFontRender::BgFillMethod::Block," the error message is:
C:\Users\XXXXX\Documents\Arduino\GFX_LilygoTest\GFX_LilygoTest.ino: In function 'void loop()':
C:\Users\XXXXX\Documents\Arduino\GFX_LilygoTest\GFX_LilygoTest.ino:324:54: error: 'OpenFontRender::BgFillMethod' has not been declared
render.setBackgroundFillMethod(OpenFontRender::BgFillMethod::Block);
I am unsure how to proceed and set the background fill method correctly. Can you please help me understand what might be causing the issue and how to resolve it?
Thank you!
Arduino IDE had an old version in memory... it got confused and even restarting couldn't help.
I edited the .h and .cpp and saved it...that solved it.