Pejvan BEIGUI wrote:

Hi all,

If my question is totally off-topic, please forgive me.

Not OT at all.

I've installed FreeType 2 with fink in order to compile some other
sources, but I get the following error :

if gcc -DHAVE_CONFIG_H -I. -I. -I../..   -I/sw/include -DSYS_DARWIN -I../../include 
`top_builddir="../.." ../../vlc-config --cflags plugin freetype` -Wsign-compare -Wall 
-I/sw/include -no-cpp-precomp -D_INTL_REDIRECT_MACROS -finline-limit-30000 -pipe -MT 
libfreetype_plugin_a-freetype.o -MD -MP -MF ".deps/libfreetype_plugin_a-freetype.Tpo" \
 -c -o libfreetype_plugin_a-freetype.o `test -f 'freetype.c' || echo './'`freetype.c; \
then mv -f ".deps/libfreetype_plugin_a-freetype.Tpo" 
".deps/libfreetype_plugin_a-freetype.Po"; \
else rm -f ".deps/libfreetype_plugin_a-freetype.Tpo"; exit 1; \
fi
In file included from freetype.c:45:
/usr/X11R6/include/freetype2/freetype/ftglyph.h:104: parse error before "FT_Library"

There are two issues here:

1. You say you have Fink's freetype2 installed, but you don't use it. Did you read "fink info freetype2"? You have to use the compiler and linker flags as given by /sw/lib/freetype2/bin/freetype-config --cflags --libs, namely
-I/sw/lib/freetype2/include -I/sw/lib/freetype2/include/freetype2
-L/sw/lib/freetype2/lib -lfreetype
The <freetype/ftglyph.h> include file should *not* be found in /usr/X11R6/include/freetype2, unless you want to use that version of freetype2, but then you wouldn't have needed to install Fink's freetype2.


2. The error message

/usr/X11R6/include/freetype2/freetype/ftglyph.h:104: warning: no semicolon at end of struct or union

etc usually is a sign that your compiler picked up yet another wrong header, this time for <freetype/freetype.h>, namely the one from freetype1, not from freetype2. This is caused by the monumental blunder of the freetype2 people not to distinguish their freetype.h from the one from freetype1, although it has a totally different API.


This happens for example when you have Fink's freetype (without "2") package installed. Remove it. Or when you have another freetype/freetype.h somewhere in your preprocessor search path.
Run "locate freetype/freetype.h" and then make sure that the only one of that list of files that is seen by your compiler is
/sw/lib/freetype2/include/freetype2/freetype/freetype.h


For error messages caused by this freetype1/freetype2 mixup see Fink FAQ#6.15 http://fink.sourceforge.net/faq/comp-general.php?phpLang=fr#freetype-problems

--
Martin



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to