'error: use of undeclared identifier 'FT_Get_Var_Axis_Flags'

I try to compile skia on Linux with these arguments:

cc = "clang"
cxx = "clang++"
target_os = "linux"
target_cpu = "x64"
is_debug = false
extra_cflags = [ "-I/path/to/freetype2/include/freetype" ]

But I am getting this error message

../../src/ports/SkFontHost_FreeType.cpp:1775:24: error: use of undeclared identifier 'FT_Get_Var_Axis_Flags'
        bool hidden = !FT_Get_Var_Axis_Flags(variations, i, &flags) &&
                       ^
../../src/ports/SkFontHost_FreeType.cpp:1776:32: error: use of undeclared identifier 'FT_VAR_AXIS_FLAG_HIDDEN'
                      (flags & FT_VAR_AXIS_FLAG_HIDDEN);
                               ^
2 errors generated.

I am sure the path to the include directory of freetype2 is correct. I also tried the path /path/to/freetype2/include but none of them helped.

Any idea how to solve this problem ?



Solution 1:[1]

you need to update your system freetype to 2.8.1 to use FT_Get_Var_Axis_Flags & FT_VAR_AXIS_FLAG_HIDDEN

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user18553374