Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Program Won't Compile - HELP

Program Won't Compile - HELP

Program Won't Compile - HELP

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 <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 ;


@implementation MyClass
-(int) sum: (int) a andb: (int) b andc: (int)c;
      return a+b+c;



int main()
    MyClass *class = [[MyClass alloc]init];

    printf("Sum is : %d",[class sum : 5 andb : 6 andc: 10]);
    [class release];

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close