freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] First try in Mac OS 9 not working


From: Garrick Meeker
Subject: Re: [Freetype] First try in Mac OS 9 not working
Date: Fri, 8 Oct 2004 19:58:03 -0700
User-agent: KMail/1.7

The codewarrior project is pretty out of date.  I'd post mine but I'm using 
Codewarrior 9 so it wouldn't be of much use.  You basically need to add 
one .c from each directory corresponding to a driver mentioned in the error 
messages (the one that includes all the other .c files in that directory).  
(The other thing missing is a carbon build that defines 
TARGET_API_MAC_CARBON, but that doesn't matter for OS 9.)

On Wednesday 06 October 2004 06:47, Pep Espunyes wrote:
> I'm trying to use FT2 to create a simple FileMaker plugin. I'm not an
> experimented programmer but I've been able to previously develop and
> compile plugins for FileMaker. However, this time is being harder than
> ever, I'm not able to make CodeWarrior 8.3 compile anything that uses FT2.
> To start with the simplest possible function, I've just adapted the code
> that comes with the tutorial. Every time I try to compile the attached code
> I get the same errors:
>
> Link Error   : undefined: 'pfr_driver_class' (data)
> Referenced from 'ft_default_modules' in FreeTypeLib
>
> Link Error   : undefined: 't42_driver_class' (data)
> Referenced from 'ft_default_modules' in FreeTypeLib
>
> Link Error   : undefined: 'bdf_driver_class' (data)
> Referenced from 'ft_default_modules' in FreeTypeLib
>
> Link Error   : undefined: 'FT_Stream_OpenLZW' (code)
> Referenced from 'PCF_Face_Init' in FreeTypeLib
>
> Link Error   : undefined: 'FT_Stream_OpenGzip' (code)
> Referenced from 'PCF_Face_Init' in FreeTypeLib
>
>
> If I delete the FreeTypeLib from the project documents, the errors are
> different:
>
> Link Error   : undefined: 'FT_New_Face' (code)
> Referenced from 'Mida' in Mida.c
>
> Link Error   : undefined: 'FT_Init_FreeType' (code)
> Referenced from 'Mida' in Mida.c
>
>
> The Mac build of the library has compiled without any error. I assume the
> Library is installed where it has to be: MacOS
> Support:Universal:Libraries:StubLibraries
>
> What did I miss? Can somebody put me a bit of light?
>
> Thanks in advance.
>
>
>
>
> #include "MacWinDefs.h"
> #include "FMExtern.h"
> #include "ParamParser.h"
>
> #include <ft2build.h>
> #include FT_FREETYPE_H
>
>
> void Mida(FHandle in, FHandle out);
>
>
> void Mida(FHandle in, FHandle out)
> {
>
>     long    insize = FMX_GetHandleSize(in);     // Check the size of input
> parameter
>     long    outsize = 0;                        // Default size of result
> is zero
>     FPtr    param = NULL;                       // Avoid using invalid
> pointer
>     char *Final = "";
>
>     // -----------------------------------------------------------------
>
>     FT_Library  library;   /* handle to library     */
>       FT_Face     face;      /* handle to face object */
>       FT_Error error;
>
>
>     error = FT_Init_FreeType( &library );
>       if ( error )
>      {
>          Final = "... an error occurred during library initialization ...";
>      } else {
>
>      error = FT_New_Face( library,
>                        "Macintosh_HD/Arial",
>                        0,
>                        &face );
>
>
>       if ( error == FT_Err_Unknown_File_Format )
>       {
>         Final = "ERROR 01";
>       } else if ( error )    {
>         Final = "EROR 02";
>       } else {
>           Final = "Ok";
>       }
>
>     }
>
>
>     //
> ---------------------------------------------------------------------
>
>     outsize = strlen(Final);                 // Calculate result size
>
>     FMX_SetHandleSize(out, outsize);        // Allocate memory for result
>
>     if(FMX_MemoryError() == 0)              // Was the memory allocated?
>     {
>         memcpy((*out), Final, outsize);     // Copy our string to the
> buffer }
>
>     if (param) FMX_DisposePointer(param);    // Release memory occupied by
> parameter
>
> }



reply via email to

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