[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CoreFoundation, CoreGraphics and opal
From: |
Fred Kiefer |
Subject: |
Re: CoreFoundation, CoreGraphics and opal |
Date: |
Mon, 05 Apr 2010 21:37:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Thunderbird/3.0.3 |
Am 01.04.2010 19:00, schrieb Vincent Richomme:
> Hi,
>
> I have implemented some part of CoreGraphics using plain C and I wanted to
> see
> if I could also implement UIkit (iPhone API).
> For my purpose I have copied headers from apple(I know it's bad!!!!) and I
> have
> modified them to compile with gcc (I rewrote properties using old school
> getter/setter).
> First I just want to see if headers are compatible and the first error I
> have is :
>
> This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.
> Making all in Source ...
> Making all for library libgnustep-uikit...
> Compiling file UIApplication.m ...
> In file included from
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CoreGraphics.h:4,
> from ../Headers/UIKit/UIApplication.h:9,
> from UIApplication.m:1:
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CGBase.h:9:28:
> warning: Availability.h: No such file or directory
> In file included from
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CoreGraphics.h:4,
> from ../Headers/UIKit/UIApplication.h:9,
> from UIApplication.m:1:
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CGBase.h:103:
> error: redefinition of typedef 'CGFloat'
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/Foundation/NSObjCRuntime.h:52:
> note: previous declaration of 'CGFloat' was here
> In file included from
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CGAffineTransform.h:7,
> from
> C:/Developer/Mingw-NG/GNUstep/System/Library/Headers/CoreGraphics/CoreGraphics.h:5,
> from ../Headers/UIKit/UIApplication.h:9,
> from UIApplication.m:1:
>
> So it seems you are providing a CGFloat definition inside
> Foundation/NSObjCRuntime.h,
> wouldn't be possible to add a new module CoreGraphics and to put
> definition inside
> CGBase.h ? Actually what I have developped looks like opal except my
> implementation is more complete.
> I don't think CGFloat definitions belongs to NSObjCRuntime and I might be
> wrong but I suppose CG means
> CoreGraphics so what do you think of my proposal ?
I don't think we want an additional dependency in base. We already have
opal, why would we need another implementation of CoreGraphics?
As far as I can see, you want your own private version of CoreGraphics,
fine by me. You have a problem there with the definition of CGFloat when
used in connection with GNUstep base. Then this a problem of your code.
And it is one that is really easy to fix. Just have a look at the way we
define CGFloat in opal CGBase.h.