Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Tom Stiller Newsgroups: comp.sys.mac.apps Subject: Re: I need help with XCode 7.3 Date: 27 Mar 2016 15:05:44 GMT Organization: Old Men With Beards Lines: 43 Message-ID: References: Reply-To: clusterfux X-Trace: individual.net dPvZltTKxxO7VQvjRooh1QHeiulUXzO4AC//KySMElxRaX5GRp Cancel-Lock: sha1:dVJQn97lsCv9U3S2o88wGMzdWEc= User-Agent: slrn/1.0.1 (Darwin) Xref: csiph.com comp.sys.mac.apps:34938 On 2016-03-27, Michael Vilain wrote: > In article , > Tom Stiller wrote: > >> I only use XCode to compile the occasional "C" program but after >> updating to OS X 10.11.4 and XCode 7.3 I cannot even compile a >> "hello world" file. >> >> Source: >> #include >> # >> int main(int argc, char** argv) >> { >> printf("Hello world.\n"); >> } >> } >> Result: >> bash-3.2$ which cc >> /Developer/usr/bin/cc >> bash-3.2$ cc hello.c >> couldn't understand kern.osversion `15.4.0' >> hello.c:1:21: error: unistd.h: No such file or directory >> hello.c: In function 'main': >> hello.c:5: warning: incompatible implicit declaration of built-in >> function 'printf' >> bash-3.2$ >> >> I don't understand what generates the >> couldn't understand kern.osversion `15.4.0' >> message and I don't know how to prevent the error. >> >> Can someone help? >> >> TIA > > I don't know when the last time was you installed Xcode, but they split > the Xcode binary into two packages--the app and the command-line tools. > You need both to compile stuff from the command line. This started with > 10.9. > Thanks, I did install the new command-line tools when prompted but I guess something went wrong. I'll revisit that.