Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
environment for using GNUmakefile with objc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
svenc
n00b
n00b


Joined: 06 Apr 2003
Posts: 33

PostPosted: Fri Dec 09, 2011 5:40 pm    Post subject: environment for using GNUmakefile with objc? Reply with quote

I think I should be doing the following to configure my environment for GNUstep & make:
Quote:
. /usr/share/GNUstep/Makefiles/GNUstep.sh


Trying to make:
Code:
#import <Foundation/Foundation.h>

int main(int argc, const char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    NSLog(@"Hello world\n");

    [pool drain];
    return 0;
}

using:
Code:
include ${GNUSTEP_MAKEFILES}/common.make

TOOL_NAME = MyApp
MyApp_OBJC_FILES = code.m

include ${GNUSTEP_MAKEFILES}/tool.make


results in:
Quote:
This is gnustep-make 2.6.1. Type 'make print-gnustep-make-help' for help.
Making all for tool simplest...
Compiling file simplest.m ...
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:82:15: error: typedef redefinition with different types
('void *' vs 'struct objc_property *')
typedef void *objc_property_t;
^
/usr/include/objc/runtime.h:139:31: note: previous definition is here
typedef struct objc_property* objc_property_t;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:126:1: error: unknown type name 'Method_t'; did you mean 'Method'?
Method * class_copyMethodList(Class cls, unsigned int *outCount);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:135:1: error: unknown type name 'Method_t'; did you mean 'Method'?
Method class_getClassMethod(Class aClass, SEL aSelector);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:139:1: error: unknown type name 'Method_t'; did you mean 'Method'?
Method class_getInstanceMethod(Class aClass, SEL aSelector);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:185:32: error: unknown type name 'Method_t'; did you mean 'Method'?
char * method_copyArgumentType(Method method, unsigned int index);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:187:30: error: unknown type name 'Method_t'; did you mean 'Method'?
char * method_copyReturnType(Method method);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:189:37: error: unknown type name 'Method_t'; did you mean 'Method'?
void method_exchangeImplementations(Method m1, Method m2);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:189:48: error: unknown type name 'Method_t'; did you mean 'Method'?
void method_exchangeImplementations(Method m1, Method m2);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:191:29: error: unknown type name 'Method_t'; did you mean 'Method'?
void method_getArgumentType(Method method, unsigned int index, char *dst, size_t dst_len);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:193:30: error: unknown type name 'Method_t'; did you mean 'Method'?
IMP method_getImplementation(Method method);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:195:20: error: unknown type name 'Method_t'; did you mean 'Method'?
SEL method_getName(Method method);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:197:38: error: unknown type name 'Method_t'; did you mean 'Method'?
unsigned method_getNumberOfArguments(Method method);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:199:27: error: unknown type name 'Method_t'; did you mean 'Method'?
void method_getReturnType(Method method, char *dst, size_t dst_len);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:201:37: error: unknown type name 'Method_t'; did you mean 'Method'?
const char * method_getTypeEncoding(Method method);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
In file included from /usr/include/GNUstepBase/GSObjCRuntime.h:47:
/usr/include/ObjectiveC2/runtime.h:203:30: error: unknown type name 'Method_t'; did you mean 'Method'?
IMP method_setImplementation(Method method, IMP imp);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
/usr/include/GNUstepBase/GSObjCRuntime.h:199:29: error: unknown type name 'Method_t'; did you mean 'Method'?
GSObjCAddMethods(Class cls, Method *list, BOOL replace);
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
In file included from simplest.m:1:
In file included from /usr/include/Foundation/Foundation.h:33:
In file included from /usr/include/Foundation/FoundationErrors.h:29:
In file included from /usr/include/Foundation/NSObject.h:30:
In file included from /usr/include/Foundation/NSObjCRuntime.h:86:
/usr/include/GNUstepBase/GSObjCRuntime.h:344:9: error: unknown type name 'Method_t'; did you mean 'Method'?
typedef Method GSMethod;
^
/usr/include/ObjectiveC2/runtime.h:77:17: note: expanded from:
# define Method Method_t
^
/usr/include/objc/runtime.h:115:29: note: 'Method' declared here
typedef struct objc_method *Method;
^
17 errors generated.
make[3]: *** [obj/simplest.obj/simplest.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [simplest.all.tool.variables] Error 2
make: *** [simplest] Error 2
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Tue Feb 07, 2012 4:25 am    Post subject: Reply with quote

Sorry for the late reply -- didn't see your post initially.

Your code snippets work for fine for me.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum