freebsd : 10 : clang : fatal error : file not found

Mayuresh Kathe mayuresh at
Tue Apr 1 10:33:43 UTC 2014


i'm trying to compile a simple obj-c "hello world" program (below);

#include <objc/Object.h>

@interface Greeter:Object

- (void)greet;


#include <stdio.h>

@implementation Greeter

- (void)greet
        printf("Hello, World!\n");


#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;

is there anything i should be doing to get that
path included in some environment variable?



More information about the freebsd-questions mailing list