.../libopencv_freetype.so .. undefined reference to `hb_buffer_get_glyph_infos'
错误信息
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_buffer_get_glyph_infos'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_font_destroy'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_ft_font_create'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_buffer_add_utf8'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_buffer_destroy'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_shape'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_buffer_guess_segment_properties'
/usr/lib/x86_64-linux-gnu/libopencv_freetype.so.3.2.0: undefined reference to `hb_buffer_create'
collect2: error: ld returned 1 exit status
解决方式
target_link_libraries(XXX ${XXX} ${XXX} -lharfbuzz)
//在后边手动加入harfbuzz这个库的链接就好啦