I'm trying to compile a program in Objective C on Ubuntu, I have installed GNUstep, set all the GNUSTEP_*
environment variables, and installed clang, because I read that gcc can't compile Objective-C code with blocks (Objective-C 'anonymous' functions, just to be clear: ^ { }
).
What I get when I run this command:
clang hello.m -o hello
Is:
hello.m:1:9: fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
^
1 error generated.
I tried this also:
clang -L '/usr/include/GNUstep/Foundation/Foundation.h' hello.m -o hello
Where /usr/include/...
is the path to the Foundation.h file on my system; but I still get the same result.
How can I link those header files automatically and compile Objective-C?
Thanks!