Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.apps > #34967

Re: I need help with XCode 7.3

From Tom Stiller <clusterfux.upmon@gmail.com>
Newsgroups comp.sys.mac.apps
Subject Re: I need help with XCode 7.3
Date 2016-03-28 18:05 +0000
Organization Old Men With Beards
Message-ID <dlta2gF5mjjU1@mid.individual.net> (permalink)
References <dlosq2F25j2U1@mid.individual.net> <dlqp9kFgpl5U2@mid.individual.net>

Show all headers | View raw


On 2016-03-27, Jolly Roger <jollyroger@pobox.com> wrote:
> On 2016-03-27, Tom Stiller <clusterfux.upmon@gmail.com> 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 <stdio.h>
>> #
>> 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.
>
OK. So When I entered cc --version
I got the same complaints couldn't understand kern.osversion `15.4.0'
along with an obsolete version number (which I neglected to copy).
and which cc still returned /Developer/usr/bin/cc

Now this system has been upgraded in place many times and I can't
remember when the /Developer directory was first installed so I
just wiped it out and re-installed XCode and the Command-line tools
and
now everything is neat and my test compiles are clean and execute as
expected.

Many thanks to all who offered help and advise.

Back to comp.sys.mac.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

I need help with XCode 7.3 Tom Stiller <clusterfux.upmon@gmail.com> - 2016-03-27 01:54 +0000
  Re: I need help with XCode 7.3 Michael Vilain <mev94303y@yahoo.com> - 2016-03-27 01:27 -0700
    Re: I need help with XCode 7.3 Tom Stiller <clusterfux.upmon@gmail.com> - 2016-03-27 15:05 +0000
      Re: I need help with XCode 7.3 Tom Stiller <clusterfux.upmon@gmail.com> - 2016-03-27 16:14 +0000
  Re: I need help with XCode 7.3 Alan Browne <alan.browne@freelunchvideotron.ca> - 2016-03-27 11:51 -0400
    Re: I need help with XCode 7.3 Lloyd Parsons <lloydp21@live.com> - 2016-03-27 14:24 -0500
  Re: I need help with XCode 7.3 Jolly Roger <jollyroger@pobox.com> - 2016-03-27 19:06 +0000
    Re: I need help with XCode 7.3 Lewis <g.kreme@gmail.com.dontsendmecopies> - 2016-03-27 21:22 +0000
    Re: I need help with XCode 7.3 Tom Stiller <clusterfux.upmon@gmail.com> - 2016-03-28 18:05 +0000
      Re: I need help with XCode 7.3 Jolly Roger <jollyroger@pobox.com> - 2016-03-28 18:18 +0000
        Re: I need help with XCode 7.3 Michael Vilain <mev94303y@yahoo.com> - 2016-03-28 20:04 -0700
      Re: I need help with XCode 7.3 Paul Sture <nospam@sture.ch> - 2016-03-28 23:46 +0200

csiph-web