[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] First try in Mac OS 9 not working
From: |
Pep Espunyes |
Subject: |
[Freetype] First try in Mac OS 9 not working |
Date: |
Wed, 06 Oct 2004 15:47:11 +0200 |
User-agent: |
Microsoft-Entourage/10.1.4.030702.0 |
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
}
--
Pep Espunyes
Andròmina eBusiness, SL
Les Paus, 68, 1er
08202 Sabadell Barcelona Spain
Telèfon: (34) 93 726 20 68
Fax: (34) 93 726 28 66
address@hidden
http://www.andromina.com
- [Freetype] First try in Mac OS 9 not working,
Pep Espunyes <=