gnustep-dev
[Top][All Lists]
Advanced

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

Re: error with runtime includes


From: Fred Kiefer
Subject: Re: error with runtime includes
Date: Tue, 24 Jan 2012 22:53:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

I think the best way forward is to just include runtime.h here and only use class_getInstanceSize(). That wont work with older versions of Objective-C without base support, but you will need GNUstep base anyway and there is no reason to use a version of base without the Objective-C 2 compatibility layer. In your specific case you are already using gcc 4.6 which provides all the necessary include files by itself.

Fred

On 24.01.2012 18:33, Riccardo Mottola wrote:
Hi,

while compiling FlexiSheet I get this:

Compiling file FSObject.m ...
In file included from FSObject.m:43:0:
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/objc-api.h:46:3: error:
#error You
can not include both objc/objc-api.h and objc/runtime.h. Include
objc/objc-api.h for the traditional GNU Objective-C Runtime API and
objc/runtime.h for the modern one.
In file included from FSObject.m:43:0:
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/objc-api.h:69:8: error:
redefinition of ‘struct objc_method_description’
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/runtime.h:87:8: note:
originally defined here
In file included from FSObject.m:43:0:
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/objc-api.h:120:28: error:
conflicting types for ‘Method’
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/runtime.h:70:29: note:
previous declaration of ‘Method’ was here
In file included from FSObject.m:43:0:
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/objc-api.h:174:30: error:
conflicting types for ‘Category’
/usr/lib/gcc/i486-linux-gnu/4.6/include/objc/runtime.h:75:31: note:
previous declaration of ‘Category’ was here

I'm using the traditional runtime and this file used to compile fine
(and on Apple too)

what is realy the problem? I am not including objc/runtime explicitely.

41 #import "FSObject.h"
42 #import <objc/objc.h>
43 #import <objc/objc-api.h>
44 #ifdef __APPLE__
45 #import <objc/objc-class.h>
46 #endif




reply via email to

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