objective-cwindowsgnustep

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


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?


Solution

  • Have a look here. It seems like one needs a bunch of parameters to the compile command.