discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Can't Get Program To Compile--Help


From: David Chisnall
Subject: Re: Can't Get Program To Compile--Help
Date: Wed, 26 Jan 2011 14:23:20 +0000

For anyone to help with this, we need to know exactly how you are trying to 
compile the code.  Are you using a GNUmakefile (this is VERY strongly 
recommended)?  Are you using gnustep-config?  Are you trying to invoke the 
compiler yourself?

David

On 26 Jan 2011, at 01:46, jokerClay wrote:

> 
> Hi All,
> 
> I am trying to learn Objective-C on a Windows Vista machine.  I have
> installed the GNUstep installs for Windows and have successfully compiled a
> "Hello World" program.  I thought I was home free to start getting into some
> coding until I tried the next tutorial that imported some files i.e.
> "Foundation/NSObject.h".  At first, I was getting "Foundation/NSObject.h no
> file or directory found" error. After putting in the path to NSObject.h, I'm
> now getting all kind of errors with NSObject.h.  To me, there shouldn't be a
> problem with NSObject.h.  I'm at a lost.  Below is my code.  Can/Will
> someone help me?  Please?
> 
> //#import<Foundation/NSObject.h>
> #import <C:/GNUStep/GNUstep/System/Library/Headers/Foundation/NSObject.h>
> @interface MyClass:NsObject{
> }  
>    //declare methods for more than one parameter
>    -(int) sum: (int) a andb: (int) b andc: (int) c ;
> @end 
> --MyClass.h--
> 
> #import<stdio.h>
> #import"MyClass.h"
> 
> @implementation MyClass
> -(int) sum: (int) a andb: (int) b andc: (int)c;
>    {
>      return a+b+c;
>    }
> @end
> 
> --MyClass.m--
> 
> #import<stdio.h>
> #import"MyClass.m"
> 
> int main()
>  {
>    MyClass *class = [[MyClass alloc]init];
> 
>    printf("Sum is : %d",[class sum : 5 andb : 6 andc: 10]);
>    [class release];
>    return;  
>  }
> --MyClassMain.m--
> -- 
> View this message in context: 
> http://old.nabble.com/Can%27t-Get-Program-To-Compile--Help-tp30763711p30763711.html
> Sent from the GNUstep - General mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep


-- Sent from my PDP-11




reply via email to

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