简体   繁体   English

在Windows上对Cygwin的`hb_ft_font_create'进行了未定义的引用

[英]undefined reference to `hb_ft_font_create' on Windows, Cygwin

I've got the following error when I tried to compile my program using Cygwin and Eclipse CDT on Windows. 当我尝试在Windows上使用Cygwin和Eclipse CDT编译我的程序时出现以下错误。

undefined reference to `hb_ft_font_create' 未定义的引用`hb_ft_font_create'

I think this is caused by the order of -l parameter. 我认为这是由-l参数的顺序引起的。 Basically this function depends on Freetype2, but the autohinter of Freetype2 also depends on Harfbuzz. 基本上这个函数依赖于Freetype2,但Freetype2的自动转换器也依赖于Harfbuzz。 That makes it a cyclic dependencies problem. 这使它成为循环依赖问题。

If I reverse the order between -lharfbuzz and -lfreetype, the other set of errors containing undefined reference to other bunch of harfbuzz functions (not includeing hb_ft_font_create) shows up. 如果我颠倒-lharfbuzz和-lfreetype之间的顺序,则会显示另一组包含对其他harfbuzz函数(不包括hb_ft_font_create)的未定义引用的错误。

So how could I resolve the undefined reference problem ? 那我怎么能解决未定义的引用问题呢?

It says HarfBuzz is not compiled with FreeType support. 它说HarfBuzz不是用FreeType支持编译的。 You should've compiled HarfBuzz first without FreeType support then after compiling FreeType with HarfBuzz support, compile HarfBuzz with FreeType support (or the reverse way, first compiling FreeType without HarfBuzz and then the rest) 您应该先编译HarfBuzz而不使用FreeType支持,然后在使用HarfBuzz支持编译FreeType之后,使用FreeType支持编译HarfBuzz(或者相反,首先编译FreeType而不使用HarfBuzz,然后编译其余部分)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM