Compiling Objective-C on Ubuntu Using GCC

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 understand: "gcc: error trying to execute exec cclobj: execvp: no such file or directory"

Do I need to install any packages? "

+3
source share
2 answers

This is not the only way, but GNUStep worked for me. For a good record when setting up, it looks here .

. . "gobjc".

+6

Source: https://habr.com/ru/post/1782146/


All Articles