Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jolly Roger Newsgroups: comp.sys.mac.apps Subject: Re: I need help with XCode 7.3 Date: 27 Mar 2016 19:06:28 GMT Organization: People for the Ethical Treatment of Pirates Lines: 79 Message-ID: References: X-Trace: individual.net ZKCOh3uiw+amEdxVSHg+wg5mbSYyDLbxQUl9LZ0zibPVPQnaQu Cancel-Lock: sha1:MoYwnVDmMy55OtgQ+3FHLYQa2w0= X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1Y%b|b-Y~()~\t,LZ3e up1/bO{=-) User-Agent: slrn/1.0.1 (Darwin) Xref: csiph.com comp.sys.mac.apps:34944 On 2016-03-27, 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? Interesting. I just updated this morning and didn't see your problem before or after the update: Before: ------- [jr on macpro at Desktop]# cc --version Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.3.0 Thread model: posix [jr on macpro at Desktop]# cc hello.c -o hello [jr on macpro at Desktop]# file hello hello: Mach-O 64-bit executable x86_64 [jr on macpro at Desktop]# ./hello Hello world. After: ------ [jr on macpro at Desktop]# cc --version Apple LLVM version 7.3.0 (clang-703.0.29) Target: x86_64-apple-darwin15.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin [jr on macpro at Desktop]# cc hello.c -o hello [jr on macpro at Desktop]# file hello hello: Mach-O 64-bit executable x86_64 [jr on macpro at Desktop]# ./hello Hello world. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR