在linux上对`hb_ft_font_create'的未定义引用

问题描述 投票:3回答:3

编译pango时出现此错误:

lib/libfreetype.so: undefined reference to `hb_ft_font_create'

我编译了freetype和harfbuzz;我也在-lfreetype变量中传递-lharfbuzzLIBS

freetype pango harfbuzz
3个回答
0
投票

查找函数'hb_ft_font_create'的定义和声明。在返回类型之前删除任何“extern”,“inline”或任何其他关键字。这样的事情:

FUNC_DEF extern blah blah blah hb_face_t* hb_ft_face_create()

hb_face_t* hb_ft_face_create()

在声明和定义中;希望能帮助到你。


0
投票

我猜你正在使用Freetype作为其他库的一部分,在这种情况下你可能不需要harfbuzz,这似乎是对字体的某种平滑。

如果是这种情况,在FreeType的cmakelists.txt顶部添加set (CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz TRUE)不需要构建freetype


-1
投票

我遇到了同样的问题,并通过以下方式解决:RE ./configure harfbuzz并安装......

© www.soinside.com 2019 - 2024. All rights reserved.