1

I installed GNUStep on Ubuntu 12.10, and some tools for Objective-C development. I then tried to compile the following code.

#import <Foundation/Foundation.h>

int main(int *argc, const char *argv[]) {
  NSAutorelease *pool = [[NSAutorelease alloc] init];
  NSLog(@"hello world");
  [pool drain];
  return 0;
}

When I compile it with gcc -o hello hello.m -Wall -lobjc, I get the following error.

Foundation/Foundation.h: No such file or directory; compilation terminated.

I find the Foundation library and other libraries in /usr/include/GNUstep/Foundation. Why am I getting that error message?

4

0 回答 0