freebsd : 10 : clang : fatal error : file not found
Mayuresh Kathe
mayuresh at kathe.in
Tue Apr 1 10:33:43 UTC 2014
hello,
i'm trying to compile a simple obj-c "hello world" program (below);
#include <objc/Object.h>
@interface Greeter:Object
{
}
- (void)greet;
@end
#include <stdio.h>
@implementation Greeter
- (void)greet
{
printf("Hello, World!\n");
}
@end
#include <stdlib.h>
int main(void)
{
id myGreeter;
myGreeter=[Greeter new];
[myGreeter greet];
[myGreeter free];
return EXIT_SUCCESS;
}
using "clang hello.m" and "clang -lobjc hello.m".
both invocations give the same error message;
fatal error: 'objc/Object.h' file not found
i did a "locate Object.h" and the file exists at;
/usr/local/include/objc/Object.h
is there anything i should be doing to get that
path included in some environment variable?
thanks,
~mayuresh
More information about the freebsd-questions
mailing list