freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] gd-1.8.4 and freetype-2.0.1


From: David Turner
Subject: Re: [Freetype] gd-1.8.4 and freetype-2.0.1
Date: Mon, 19 Feb 2001 22:50:22 +0100

Hello,

Lewis Bergman a écrit :
> 
> Any help would be greatly appreciated as I have been battling this for about a
> week.
> 
> Here are the errors I get with gd-1.8.4 after a successfull build of all
> libraries including freetype:
>  JPEG -DHAVE_LIBFREETYPE   -c pngtogd.c -o pngtogd.o
> gcc -I. -I/usr/local/include/freetype2/freetype -I/usr/include/X11 
> -I/usr/X11R6/include/X11 -I/usr/local/include  pngtogd.o -o pngtogd  -L. 
> -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib -lgd -lpng -lz -ljpeg 
> -lfreetype -lm
> /usr/local/lib/libfreetype.so: undefined reference to `tt_driver_class'
> /usr/local/lib/libfreetype.so: undefined reference to `cff_driver_class'
> /usr/local/lib/libfreetype.so: undefined reference to `t1_driver_class'
> /usr/local/lib/libfreetype.so: undefined reference to `FT_New_Library'
> /usr/local/lib/libfreetype.so: undefined reference to `autohint_module_class'
> /usr/local/lib/libfreetype.so: undefined reference to `winfnt_driver_class'
> /usr/local/lib/libfreetype.so: undefined reference to `psnames_module_class'
> /usr/local/lib/libfreetype.so: undefined reference to `sfnt_module_class'
> /usr/local/lib/libfreetype.so: undefined reference to `FT_Add_Module'
> /usr/local/lib/libfreetype.so: undefined reference to 
> `ft_raster1_renderer_class'
> /usr/local/lib/libfreetype.so: undefined reference to `FT_Done_Library'
> /usr/local/lib/libfreetype.so: undefined reference to `psaux_module_class'
> /usr/local/lib/libfreetype.so: undefined reference to 
> `ft_smooth_renderer_class'
> /usr/local/lib/libfreetype.so: undefined reference to `t1cid_driver_class'
> collect2: ld returned 1 exit status
> make: *** [pngtogd] Error 1
>
it seems you didn't compile FreeType 2 correctly.. How exactly did you
compile
it (i.e. "make setup", "make", "make install" should be enough on
Unix..)

did you see warnings during compilations (you should normally don't see
a _single_ one !!
 
> I have tried every conceivable include dir structure I can think of. I have
> linked the /usr/local/include/freetype2/freetype/... and all its subdirs and
> files in both trees two levels up. The only thing I haven't done is try to
> build the freetype library in a single file.

On Unix, you should use the result of the command "freetype-config
--cflags",
which will return "-I/usr/local/include/freetype2". And "freetype-config
--libs"
should return "-lfreetype"


> The only reason I haven't done
> that is I have read the instructions about a dozen times and can't figure out
> where to start. I know you move everything from src into a single dir but then
> what do you do with all the files that are named the same? The rules.mk and 
> the
> makefile.mk?

These are not source files and shouldn't be included in the common
directory.

 Also, I have no clue as to use the function or macro the docs talk
> about to build the thing as a single file structure.
>
Before doing this, have you considered building the sources manually in
the normal way, as explained in docs/BUILD, i.e.:

    cd freetype2
    cc -c -Iinclude -Isrc  src/base/ftbase.c
    cc -c -Iinclude -Isrc  src/base/ftdebug.c
    cc -c -Iinclude -Isrc  src/base/ftglyph.c
    cc -c -Iinclude -Isrc  src/base/ftsystem.c
    cc -c -Iinclude -Isrc  src/base/ftbbox.c
    cc -c -Iinclude -Isrc  src/sfnt/sfnt.c
    cc -c -Iinclude -Isrc  src/autohint/autohint.c
    cc -c -Iinclude -Isrc  src/cache/cache.c
    cc -c -Iinclude -Isrc  src/cff/cff.c
    cc -c -Iinclude -Isrc  src/cid/type1cid.c
    cc -c -Iinclude -Isrc  src/psaux/psaux.c
    cc -c -Iinclude -Isrc  src/psnames/psnames.c
    cc -c -Iinclude -Isrc  src/raster/raster.c
    cc -c -Iinclude -Isrc  src/smooth/smooth.c
    cc -c -Iinclude -Isrc  src/truetype/truetype.c
    cc -c -Iinclude -Isrc  src/type1/type1.c
    cc -c -Iinclude -Isrc  src/winfonts/winfonts.c
    ar -r libfreetype.a *.o

Otherwise, try the following (on Unix):

    (the *.mk files are not source files and don't need to
     be copied to the single directory. They're really
     sub-Makefiles used by the build system)

    cd freetype2
    mkdir  ..../somedir
    cp -R include ..../somedir/include
    find -name "*.[hc]" > filelist
    cp `echo filelist` ..../somedir

    cd ..../somedir
    cc -c -I. -DFT_FLAT_COMPILATION ftbase.c
    cc -c -I. -DFT_FLAT_COMPILATION ftdebug.c
    cc -c -I. -DFT_FLAT_COMPILATION .... same files as above
    ar -r libfreetype.a *.o

Hope this helps, and let us know if you have problems !!

- David

PS: FreeType 2.0.2.test is out, you might want to test it..



reply via email to

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