[Top][All Lists]

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

Re: [ft] MSYS, AF_SCRIPT_LATIN2 undeclared here (not in a function)

From: Werner LEMBERG
Subject: Re: [ft] MSYS, AF_SCRIPT_LATIN2 undeclared here (not in a function)
Date: Fri, 19 Jun 2009 08:46:11 +0200 (CEST)

> I'm attempting to compile freetype 2.3.9 under MSYS on windows XP
> (MinGW) I'm using scons build system, and I has followed the
> instructions in CUSTOMIZE file, for a flat filesystem build.  I've
> copied all the .h and .c files into the single directory, and copied
> the include/ directory there two.

But you are apparently compiling too much files...

> When it gets to compile aflatin2.c, I receive:
> gcc -o aflatin2.c -c -Iinclude aflatin2.c
> aflatin2.c:2278: error: 'AF_SCRIPT_LATIN2' undeclared here (not in a
> function)
> aflatin2.c:2278: error: initializer element is not constant
> aflatin2.c:2278: error: (near initialization for 'af_latin2_script_class.
> script')

... in particular, you shouldn't compile this file directly.  Instead,
as described in INSTALL.ANY, you should compile autofit.c, which
includes aflatin2.c -- but only if the macro FT_OPTION_AUTOFIT2 is
defined.  And exactly this macro also protects the definition of
the AF_SCRIPT_LATIN2 enumeration value.

If you really want to compile file by file, not using autofit.c (this
is equivalent to a `make multi' build), you should check the list of
files in the corresponding `' helper file.  For example, the
`autofit' module gives

  AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \
                   $(AUTOF_DIR)/afcjk.c    \
                   $(AUTOF_DIR)/afdummy.c  \
                   $(AUTOF_DIR)/afglobal.c \
                   $(AUTOF_DIR)/afhints.c  \
                   $(AUTOF_DIR)/afindic.c  \
                   $(AUTOF_DIR)/aflatin.c  \
                   $(AUTOF_DIR)/afloader.c \
                   $(AUTOF_DIR)/afmodule.c \

As can be seen, aflatin2.c is not part of the list.  Admittedly, the
whole contents of aflatin2.c could be protected by FT_OPTION_AUTOFIT2
to avoid the problem you've experienced, but the current status of the
file is experimental, which is the reason of not being fully
integrated into the build system.


reply via email to

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