freetype-devel
[Top][All Lists]
Advanced

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

RE: [Devel] FT_New_Face undefined symbol


From: Karl Schultz
Subject: RE: [Devel] FT_New_Face undefined symbol
Date: Wed, 27 Nov 2002 10:27:02 -0700

> -----Original Message-----
> From: David Turner [mailto:address@hidden
> Sent: Wednesday, November 27, 2002 9:08 AM
> To: address@hidden
> Subject: Re: [Devel] FT_New_Face undefined symbol
> 
> 
> Hi Riccardo,
> 
> Riccardo Cohen wrote:
> > with my version (2.1.2) I had to comment the line 112 
> #define FT_MACINTOSH 1 in file 
> include/freetype/config/ftconfig.h because this line make it 
> consider macosx like macos9 from the ft_new_face point of 
> view, which is wrong.
> >

I had the same problem, which I worked around in the same way.

> 
> It seems this definition is encapsulated in a test. The code is:
> 
>    #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && 
> defined( macintosh ) )
>    #define FT_MACINTOSH 1
>    #endif
> 
> We probably need a better test to disable this on MacOS-X.

Yes.

I found this:

=====

Newsgroups: comp.sys.mac.programmer.help
Date: 2001-03-18 19:18:10 PST 
 

In article <address@hidden>,
 Brandon <address@hidden> wrote:

>Using #ifdef and #endif, what should I check for so that I can compile
>only certain code based on what the target project is?  Right now I'm
>checking for whether or not TARGET_OS_MAC and TARGET_OS_WIN32 have been
>defined.  However, to compile successfully on Mac without compile time
>errors, I have to include ConditionalMacros.h.  Since that is not
>available for Windows targets, I get errors when that line isn't
>commented out.  I obviously can't #include <ConditionalMacros.h> based
>on whether or not TARGET_OS_MAC has been defined because to check
>whether or not that has been befined would require ConditionalMacros.h
>to be included in the first place.  Why would that be needed for Mac
>targets but not Win32 targets?  Better yet, how can I test for the
>target with both targets without having to manually comment out #include
><ConditionalMacros.h> every time I switch project targets?

I already answered this question, and I think it was you who asked. The 
answer was:

#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))

/* You are on Mac OS 9 or X */

hth,

meeroh

=====

So it would seem that:

#if defined( macintosh )
#define FT_MACINTOSH 1
#endif

suffices since you really only want the MacOS specific API for OS 9.

I was NOT able to try this on OS 9 but it works on OS X.

I see __APPLE__ used a lot when porting older Unix code over to OS X, so I
don't think that it is appropriate to use __APPLE__ to activate OS 9 code in
an OS X environment.
 
> Or should we compiled *both* FT_New_Face and the MacOS specific APIs
> on MacOS-X ? (A small new configuration macro would be required then,
> but that's nothing really difficult).

I don't think so.  You shouldn't need the MacOS(9) specific APIs on OS X,
since OS X is just like any other Unix platform, from FreeType's point of
view.  At least, that is how I see it.

Karl



reply via email to

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