Hi,I am getting the same error when I compile using gnustep mingw32 on win XP.
I am trying a simple program:
#
ClassTest.h
import
import
@interface ClassTest: NSObject
{
int a;
int b;
}
-(void) setvara : (int) x;
-(void) setvarb : (int) y;
-(int) add;
@end
ClassTest.m
import
import"ClassTest.h"
@implementation ClassTest
{
-(void) setvara :(int) x
{
a=x;
}
-(void) servarb: (int) y
{
b=y;
}
-(int) add
{
return a+b;
}
}
@end
ClassTestMain.m
import
import"ClassTest.m"
imt main()
{
ClassTest *class = [[ClassTest alloc]init];
[class setvara : 5];
[class servarb : 6];
printf("Sum is:%d", [class add]);
[class release];
return;
}
#
$ gcc -o test ClassTest.h ClassTest.m ClassTestMain.m
ClassTest.h:2:32: Foundation/NSobject.h: No such file or directory
ClassTest.h:5: error: stray '@' in program
ClassTest.h:5: error: syntax error before "ClassTest"
ClassTest.h:11: error: syntax error before '}' token
ClassTest.h:17: error: stray '@' in program
ClassTest.h:17:5: warning: no newline at end of file
In file included from ClassTest.m:2:
ClassTest.h:2:32: Foundation/NSobject.h: No such file or directory
In file included from ClassTest.m:2:
ClassTest.h:11: error: cannot find interface declaration for NSObject', supercl
ass of
ClassTest'
In file included from ClassTest.m:2,
from ClassTestMain.m:2:
ClassTest.h:2:32: Foundation/NSobject.h: No such file or directory
In file included from ClassTest.m:2,
from ClassTestMain.m:2:
ClassTest.h:11: error: cannot find interface declaration for NSObject', supercl
ass of
ClassTest'
#