gnustep-dev
[Top][All Lists]
Advanced

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

Legacy applications and headers


From: Marcus Müller
Subject: Legacy applications and headers
Date: Fri, 19 Mar 2004 16:02:26 +0100

I'm currently evaluating a migration path from Apple's WebObjects 4.5 to a SOPE/GDL2 based solution. When porting GDL2 to MacOSX Xcode I found out that GDL2 often uses constructs like the following in its headers:

#ifndef NeXT_Foundation_LIBRARY
#include <Foundation/NSArray.h>
#include <Foundation/NSException.h>
#include <Foundation/NSZone.h>
#else
#include <Foundation/Foundation.h>
#endif

This is correct in a GNUstep environment, because some variables concerning library combos and runtime are always defined there.

Using Xcode on MacOSX this is problematic because these variables are not defined automatically. Sometimes it's possible to set these in the respective build environments (Xcode, Makefiles), but this is a tedious step and sometimes, for larger legacy projects, error prone - as I currently experienced.

(For completeness' sake, in the example above, without the manual definition of NeXT_Foundation_LIBRARY the build will fail on MacOSX due to redefinitions of NSArray and the like.)


My request is to change these statements into:

#ifdef GNUSTEP_BASE_LIBRARY
#include <Foundation/NSArray.h>
#include <Foundation/NSException.h>
#include <Foundation/NSZone.h>
#else
#include <Foundation/Foundation.h>
#endif

It won't change anything in the GNUstep environment, however makes a bit difference when using this on MacOSX.


Cheers,

  Marcus

--
Marcus Mueller  .  .  .  crack-admin/coder ;-)
Mulle kybernetiK  .  http://www.mulle-kybernetik.com
Current projects: finger address@hidden





reply via email to

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