Unable to find standard libraries when compiling Objective-C using GNUstep on Windows

Posted by Jason Roberts on Stack Overflow See other posts from Stack Overflow or by Jason Roberts
Published on 2009-02-25T19:20:18Z Indexed on 2010/04/29 0:27 UTC
Read the original article Hit count: 727

Filed under:
|
|

I just installed GNUstep on my Windows XP machine and I'm attempting to compile the following Objective-C Hello World program from the command line:

#import <Foundation/Foundation.h>

int main(int argc, const char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    NSLog(@"Hello world\n");

    [pool drain];
    return 0;
}

When I try to compile the program from the command line like so

gcc hello.m -o hello

I end up getting the following error

hello.m:1:34: Foundation/Foundation.h: No such file or directory

Is there something I need to do order to inform the compiler of where the standard Objective-C libraries are located?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about gnustep