[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] core dumps with freetype 2.1.9 and AIX 5.2
From: |
Werner LEMBERG |
Subject: |
Re: [ft] core dumps with freetype 2.1.9 and AIX 5.2 |
Date: |
Wed, 23 Mar 2005 19:07:43 +0100 (CET) |
> /* We use char because int might match the return type of a gcc2
> builtin and then its argument prototype would still apply. */
> char FT_Init_FreeType ();
> int main ()
> {
> FT_Init_FreeType ();
> return 0;
> }
>
> I compile that using:
>
> /opt/www/bin/gcc -o ct -g -O2 -DFT_DEBUG_LEVEL_TRACE=1
> -I/opt/www/include/freetype2 -I/opt/www/include -L/opt/www/lib
> -Wl,-blibpath:/opt/www/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.3:/opt/www/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.3/../../..:/usr/lib:/lib
> -L/opt/www/lib test.c -lfreetype -lpng -lz -lm -liconv
>
> and it compiles fine. When I run it I get the infamous "Segmentation
> fault (core dumped)".
How shall this work? FT_Init_FreeType needs an argument, but you are
faking it with an incorrect declaration. The above test (probably
taken from an autoconf snippet) can be *only* used to test whether the
function `FT_Init_FreeType' is available in the library to be checked
for. It is *not* meant to ever get a working executable.
Werner