Why do I get this error msg: texture-font.c:(.text+0x10d): undefined reference to `FT_Init_FreeType'

60 views
Skip to first unread message

l...@sr-research.com

unread,
Jun 21, 2016, 10:46:59 AM6/21/16
to freetype-gl

Hi,

    I build libfreetype-gl.a on 64bit ubuntu, by doing:
   

$cmake -Dfreetype-gl_BUILD_DEMOS=OFF -DFREETYPE-GLXX_BUILD_DEMO=OFF -DINTERNAL_FREETYPE=OFF -DINTERNAL_GLEW=OFF -DGLUT_INCLUDE_DIR=~/li/bin

then make

When I use libfreetype-gl.a in my project, I get error saying:

libftgl64.a(texture-font.c.o): In function `texture_font_load_face':
texture-font.c:(.text+0x10d): undefined reference to `FT_Init_FreeType'

texture-font.c:(.text+0x18b): undefined reference to `FT_New_Face'
texture-font.c:(.text+0x1f9): undefined reference to `FT_Done_FreeType'
texture-font.c:(.text+0x217): undefined reference to `FT_Select_Charmap'
texture-font.c:(.text+0x285): undefined reference to `FT_Done_Face'
texture-font.c:(.text+0x294): undefined reference to `FT_Done_FreeType'
texture-font.c:(.text+0x2e4): undefined reference to `FT_Set_Char_Size'
texture-font.c:(.text+0x352): undefined reference to `FT_Done_Face'
...

Does anyone know why I get these error messages and how to fix it? Thanks a lot!

LJ




Nicolas Rougier

unread,
Jun 21, 2016, 10:54:48 AM6/21/16
to freet...@googlegroups.com

Most probably the freetype library is missing.
Did you check the last version at https://github.com/rougier/freetype-gl ?

If so, can you open an issue on github ?


Nicolas
> --
> You received this message because you are subscribed to the Google Groups "freetype-gl" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to freetype-gl...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

l...@sr-research.com

unread,
Jun 21, 2016, 11:37:11 AM6/21/16
to freetype-gl
Hi, 

    Thank you very much for your reply. I think it is probably my side problem because I made a 32bit dynamic version before and it works.
    for freetype library, is it included in libfreetype-gl or I should link it seperately say, add -lfreetype? Thanks. 

     By the way, do you know how to build dynamic library instead of a static freetype-gl? Thanks a lot!

LJ    

Glumpy

unread,
Jun 21, 2016, 1:16:20 PM6/21/16
to freet...@googlegroups.com

> On 21 Jun 2016, at 17:37, l...@sr-research.com wrote:
>
> Hi,
>
> Thank you very much for your reply. I think it is probably my side problem because I made a 32bit dynamic version before and it works.
> for freetype library, is it included in libfreetype-gl or I should link it seperately say, add -lfreetype? Thanks.
>
> By the way, do you know how to build dynamic library instead of a static freetype-gl? Thanks a lot!


It very much depend on your system I think. You can have a look at the new CMakefile to check if there is an option. If not, just open an issue on github, I'm pretty sure someone already solved the problem.

Nicolas
Reply all
Reply to author
Forward
0 new messages