Objective-c – compiling Objective-C on Ubuntu using GCC

gccgnustepobjective cUbuntu

ok i have this program here:

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    NSLog (@"Hello world!");
    [pool drain];
    return 0;
}

the problem is when i compile it with the command
"gcc -framework Foundation prog1.m -o prog1"

i get this:
"gcc: error trying to exec 'cclobj' : execvp: No such file or Directory"

do i need to install any packages??
"

Best Answer

Its not the only way but GNUStep worked for me. For a good writeup on setting it up look here.

Note: Your exact error is listed about halfway down that page. Your missing package seems to be 'gobjc'.