[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getting : error: 'autoreleasepool' undeclared (first use in this functi
From: |
umen |
Subject: |
getting : error: 'autoreleasepool' undeclared (first use in this function) |
Date: |
Wed, 2 Jan 2013 06:33:51 -0800 (PST) |
Hello all
im using gnusetup to learn objC , its great but . now i have basic error
which i can't find any hint how solve it
i have this simple main :
#import <stdio.h>
#import <Foundation/Foundation.h>
#import "ClassA.h"
#import "ClassB.h"
int main(int argsc,const char** argsv)
{
@autoreleasepool {
ClassB* pClassB ;
pClassB = [[ClassB alloc] init];
[pClassB printX];
[pClassB initVar:5];
[pClassB printX];
}
return 0;
}
and the make file that looks like this :
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = IntTestInheritance
IntTestInheritance_HEADERS = ClassA.h
IntTestInheritance_OBJC_FILES = main.m ClassA.m
IntTestInheritance_RESOURCE_FILES =
include $(GNUSTEP_MAKEFILES)/tool.make
and when compiling im getting this error:
$ make
This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help.
Making all for tool IntTestInheritance...
Compiling file main.m ...
main.m: In function 'main':
main.m:8:2: error: stray '@' in program
main.m:8:3: error: 'autoreleasepool' undeclared (first use in this function)
main.m:8:3: note: each undeclared identifier is reported only once for each
function it appears in
main.m:8:19: error: expected ';' before '{' token
main.m:22:1: warning: control reaches end of non-void function
[-Wreturn-type]
make[3]: *** [obj/IntTestInheritance.obj/main.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [IntTestInheritance.all.tool.variables] Error 2
make: *** [internal-all] Error 2
why ?
thanks !
--
View this message in context:
http://gnustep.8.n7.nabble.com/getting-error-autoreleasepool-undeclared-first-use-in-this-function-tp32251.html
Sent from the GNUstep - General mailing list archive at Nabble.com.
- getting : error: 'autoreleasepool' undeclared (first use in this function),
umen <=