freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] Re: Problem


From: Werner LEMBERG
Subject: [Devel] Re: Problem
Date: Tue, 28 Dec 2004 08:11:52 +0100 (CET)

> However, after I compiled freetype2, I wanted to compile fontconfig
> and gtk+-2.4.14, which both use freetype.  During the compilation
> process, I got the error message from the freetype.h file:
>
>   /usr/include/freetype2/freetype/freetype.h:20:2:
>     #error "`ft2build.h' hasn't been included yet!"
>   /usr/include/freetype2/freetype/freetype.h:21:2:
>     #error "Please always use macros to include FreeType header files."
>   /usr/include/freetype2/freetype/freetype.h:22:2:
>     #error "Example:"
>   /usr/include/freetype2/freetype/freetype.h:23:2:
>     #error "  #include <ft2build.h>"
>   /usr/include/freetype2/freetype/freetype.h:24:2:
>     #error "  #include FT_FREETYPE_H"
>
> I am not a very good programmer, but looked into the freetype.h file
> and noticed that there is a check for the inclusion of "ft2build.h"
> before it is included later in the file. I put the #include line
> before the check in "freetype.h", and now gtk compiles. Was that a
> stupid maneuver on my part, or is that a minor oversight in the
> freetype.h file?

As the message says, you must say

  #include <ft2build.h>
  #include FT_FREETYPE_H

this is, you have to load ft2build.h (defining the macro
`FT_FREETYPE_H') before loading freetype.h itself, and you can't say

  #include freetype.h

at all.  This change has been announced years ago, and since some time
FreeType 2 enforces this loading scheme.

You might contact a gtk list how to solve the problem.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]