I'm on Ubuntu 12.
I am trying to compile an Objective-C hello_world application using clang. This is the source:
#import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog (@"hello world"); [pool drain]; return 0; }
I use this command line:
. /usr/share/GNUstep/Makefiles/GNUstep.sh clang hm `gnustep-config --objc-flags` -lgnustep-base -o hello
I get the following error:
clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' In file included from hm:1: In file included from /usr/include/GNUstep/Foundation/Foundation.h:30: In file included from /usr/include/GNUstep/GNUstepBase/GSVersionMacros.h:193: In file included from /usr/include/GNUstep/GNUstepBase/GSConfig.h:229: /usr/include/GNUstep/GNUstepBase/preface.h:112:11: fatal error: 'objc/objc.h' file not found
The same command line using gcc works fine.
Any ideas on how to fix this objc.h error?
source share