|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Need helpHello Friends,
Please help me. I try to use GNUstep for windows and it work for basic program. but it not work any includeing file program
for example. MyClass.h ========= #import<NSObject.h> @interface MyClass:NSObject{ int a; int b;
} -(void) setvara : (int) x; -(void) setvarb : (int) y; -(int) add; @end MyClass.m ========= #import<stdio.h> #import"MyClass.h" @implementation MyClass -(void) setvara :(int) x{ a=x; } -(void) setvarb :(int) y{
b=y; } -(int) add{ return a+b; } @end main.m ====== #import<stdio.h> #import"MyClass.m" int main(){ MyClass *class = [[MyClass alloc]init]; [class setvara : 5]; [class setvarb : 6]; printf("Sum is : %d",[class add]);
[class release]; return ; } Please tell me how to compile this program and run it. It get that error that NSobject.h No such file or directory
In this simple program sample.m #import <Foundation/Foundation.h> int main (int argc, const char * argv[])
{ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog (@”Programming is fun!”); [pool drain]; return 0;
} Error sample.m:1:34: Foundation/Foundation.h: No such file or directory
D:\LEARNING\iphone\ObjectiveC\sample.m: In function `main': sample.m:4: error: `NSAutoreleasePool' undeclared (first use in this function)
sample.m:4: error: (Each undeclared identifier is reported only once sample.m:4: error: for each function it appears in.)
sample.m:4: error: `pool' undeclared (first use in this function) sample.m:5: error: stray '@' in program
sample.m:5: error: stray '\148' in program sample.m:5: error: `Programming' undeclared (first use in this function)
sample.m:5: error: syntax error before "is" sample.m:5: error: stray '\148' in program
Please help me and reply soon. -- Vishal Bhuva 9898235709 Software Expert Ahmedabad INDIA _______________________________________________ Bug-gnustep mailing list Bug-gnustep@... http://lists.gnu.org/mailman/listinfo/bug-gnustep |
|
|
Re: Need helpOn 15 Oct 2009, at 13:37, vishal bhuva wrote: > Hello Friends, > > > Please help me. > > I try to use GNUstep for windows and it work for basic program. > > but it not work any includeing file program See the tutorial at http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/ This will take you through the process of getting started building simple programs. _______________________________________________ Bug-gnustep mailing list Bug-gnustep@... http://lists.gnu.org/mailman/listinfo/bug-gnustep |
| Free embeddable forum powered by Nabble | Forum Help |