I'm trying to build file DisplayControl.cpp using SDK generated using bitbake based on my Yocto project. However, on this part:
int DisplayControl::loadFonts()
{
FT_Library library;
FT_Face face;
FT_Init_FreeType(&library);
//...
return 0;
}
Copiler returns following error:
In file included from /home/kek/Documents/Projects/Yocto/ice-misc/icedisplay/src/DisplayControl.hpp:15,
from /home/kek/Documents/Projects/Yocto/ice-misc/icedisplay/src/main.cpp:7:
> /opt/ice-sma/0.1/sysroots/cortexa53-crypto-poky-linux/usr/include/cairo/cairo-ft.h:46:10: fatal error: ft2build.h: No such file or directory
46 | #include <ft2build.h>
> | ^~~~~~~~~~~~
compilation terminated.
I checked path specified in the error - /opt/ice-sma/0.1/sysroots/cortexa53-crypto-poky-linux/usr/include/cairo and there was no ft2build.h file, but it is present at /opt/ice-sma/0.1/sysroots/cortexa53-crypto-poky-linux/usr/include/freetype2. I also tried placing it manually in specified folder, but I would get the same error.
Freetype and Cairo libraries are included in .bb file:
DEPENDS = "alsa-lib gflags glog cairo freetype"
I tried following steps described here, but it was hard to apply since it was both local build (not Yocto) and it used JUCE framework so it was a little help.
So, how do I make the compiler aware that the file is there? I considered this to be some sort of linker issue, but I just can't find the cause.