discuss-gnustep
[Top][All Lists]
Advanced

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

got error when compile


From: Apache
Subject: got error when compile
Date: Wed, 8 Jul 2009 02:42:04 -0700 (PDT)
User-agent: G2/1.0

Hi, I'm java developer and start learning objective c using GNUstep

i download and install gnustep-system-0.22.0-setup.exe and gnustep-
core-0.22.0-setup.exe where in c:/ and my source also in c:/ (not in
any folder)

my source code

say.h
--------
#ifndef _Say_H_
#define _Say_H_

#include <Foundation/NSObject.h>
@interface Say: NSObject
{
}
- (void) sayHello;
- (void) sayHelloTo: (NSString *)name;
@end

#endif /* _Say_H_ */

main.m
-----------
#include "say.h"
#include <Foundation/Foundation.h>

int main (void)
{
   id speaker;
   NSString *name = @"GNUstep !";
   NSAutoreleasePool *pool;

   pool = [NSAutoreleasePool new];
   speaker = [[Say alloc] init];

   [speaker sayHello];
   [speaker sayHelloTo:name];

   RELEASE(speaker);
   RELEASE(pool);
}


but when i compile using
gcc -o main main.m   i receive the following error

$ gcc -o main main.m
In file included from main.m:1:
say.h:4:33: Foundation/NSObject.h: No such file or directory
In file included from main.m:1:
say.h:7: error: cannot find interface declaration for `NSObject',
superclass of
`Say'

kindly help me in this situation

thanks


reply via email to

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