[Top][All Lists]

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

Re: Portability/Compatability between GNUstep <---> Cocoa...

From: Nicola Pero
Subject: Re: Portability/Compatability between GNUstep <---> Cocoa...
Date: Tue, 13 Jan 2004 12:04:37 +0000 (GMT)

> > > Not sure what you are asking for. But if you only want to find out if 
> > > your code compiles in a GNUstep or a MacOSX environment a test for 
> > > #ifdef GNUSTEP should do.
> > >
> > This seems to be just the one I'm seeking for. Which file defines the 
> > macro?  Or is this
> > one defined by each programmer?
> The problem with #ifdef GNUSTEP is that, AFAIR, it is still defined if you 
> use GNUstep-make to build under OS X.

Not exactly - GNUSTEP is defined if and only if gnustep-make is compiling
for the gnu-gnu-gnu library combo.

GNUSTEP is a good macro to know if you are using gnustep's frameworks or
Apple's frameworks.

Of course, you must be building gnustep stuff using gnustep-make, which is
quite a standard way of doing things.

> That's no good. Apple's GCC always defines __APPLE__

If Apple's GCC always defines __APPLE__, that is not good, because if you
are trying to use gnustep-base on Apple instead of Apple's FoundationKit
(a task which does present difficulties, but which has been attempted many
times), then Apple's GCC would still define __APPLE__ even if you are
actually using gnustep-base.

> and there's also MAC_OS_X (or is it MAC_OSX, I can never remember..)

This suffers from the same problem.

reply via email to

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