discuss-gnustep
[Top][All Lists]
Advanced

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

compile problem


From: pradip patel
Subject: compile problem
Date: Tue, 13 Jun 2006 11:08:51 +0530

Hi
can some one plz. help me
i write following program ..

with which option i have to compile with gcc compiler..
i try following two

1>gcc -c -Wno-import -I . main.m
In this i get following error
In file included from
/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:29,
                 from main.m:1:
Foundation/NSObjCRuntime.h:32:39: GNUstepBase/GSObjCRuntime.h: No such
file or directory
In file included from
/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:29,
                 from main.m:1:
Foundation/NSObjCRuntime.h:34: syntax error before "NSString"
Foundation/NSObjCRuntime.h:34: syntax error before "aSelector"
Foundation/NSObjCRuntime.h:34: warning: data definition has no type or
storage class
Foundation/NSObjCRuntime.h:35: syntax error before "SEL"
Foundation/NSObjCRuntime.h:35: syntax error before '*' token
Foundation/NSObjCRuntime.h:35: warning: data definition has no type or
storage class
Foundation/NSObjCRuntime.h:36: syntax error before "Class"
Foundation/NSObjCRuntime.h:36: syntax error before '*' token
Foundation/NSObjCRuntime.h:36: warning: data definition has no type or
storage class
Foundation/NSObjCRuntime.h:37: syntax error before "NSString"
Foundation/NSObjCRuntime.h:37: syntax error before "aClass"
Foundation/NSObjCRuntime.h:37: warning: data definition has no type or
storage class
as per more and more lines

2>gcc -c -Wno-import main.m
In this i get following error
In file included from
main.m:1:/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:29:38: 
Foundation/NSObjCRuntime.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:30:22: 
GSConfig.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:31:32: 
Foundation/NSDebug.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:32:33: 
Foundation/NSObject.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:34:35: 
Foundation/NSArchiver.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:35:32: 
Foundation/NSArray.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:36:43: 
Foundation/NSAttributedString.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:37:42: 
Foundation/NSAutoreleasePool.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:38:33: 
Foundation/NSBundle.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:39:36:
Foundation/NSByteOrder.h: No such file or
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:40:39: 
Foundation/NSCalendarDate.h: No such file or 
directory/usr/GNUstep/System/Library/Headers/Foundation/Foundation.h:41:39: 
Foundation/NSCharacterSet.h: No such file or directory
as per more and more lines


#import </usr/GNUstep/System/Library/Headers/Foundation/Foundation.h>
int main(int argc,const char *argv)
{
        NSMutableArray *array;
        int i;
        NSNumber *newNumber;
        NSNumber *numberToPrint;
        NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];
        array = [[NSMutableArray allloc] init];
        for( i = 0; i < 10; i++)
        {
                newNumber = [[NSNumber alloc] initWithInt:(i * 3)];
                [array addObject:newNumber];
        }
        for( i = 0; i < 10; i++ )
        {
                numberToPrint = [array objectAtIndex:i];
                NSLog(@"The number at index %d is %@",i,numberToPrint);
        }
        [array release];
        [pool release];
        return 0;
}




eInfochips Business Disclaimer:
This message may contain confidential, proprietary or legally Privileged 
information. In case you are not the original intended Recipient of the 
message, you must not, directly or indirectly, use, Disclose, distribute, 
print, or copy any part of this message and you are requested to delete it and 
inform the sender. Any views expressed in this message are those of the 
individual sender unless otherwise stated. Nothing contained in this message 
shall be construed as an offer or acceptance of any offer by eInfochips Limited 
and/or eInfochips Inc("eInfochips") unless sent with that express intent and 
with due authority of eInfochips. eInfochips has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.




reply via email to

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