Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Xcode issues, doesn't compile files |
| Date | 2015-05-03 13:46 -0700 |
| Organization | None to speak of |
| Message-ID | <87r3qxmltb.fsf@kst-u.example.com> (permalink) |
| References | <f48581af-5efd-4b44-b982-d64c048adc2e@googlegroups.com> <03L_w.5955$Jg1.2546@uutiset.elisa.fi> <87sibogdka.fsf@kst-u.example.com> <Uyv1x.6943$Jg1.3390@uutiset.elisa.fi> |
Hiidenkivi <hiidenkivi@nospam.no> writes:
> Keith Thompson kirjoitti:
>> I can nearly guarantee that it won't. On my system, both programs
>> produce the same output. On the OP's system, the original program
>> doesn't produce any output at all, because it doesn't build.
>
> However I can clearly see that the OP's source code has an issue which
> will cause build to fail in any normal C compiler conforming to ANSI C
> rules. OP's code is not correct C89 which XCode expects it to be in
> its default configuration.
Fair enough, I likely didn't notice that. (Incidentally, I advise
avoiding the phrase "ANSI C". It commonly refers to the 1989 ANSI C
standard, but that standard is obsolete according to ANSI itself,
superseded by the 1990, 1999, and 2011 ISO C standards. What you mean
is ANSI C89 or, equivalently, ISO C90.)
But that's not the problem the OP was asking about, and I reiterate that
your modified program almost certainly would not help the OP. The
compiler didn't complain about the presence of a declaration followed by
a statement within a block; it complained that "_main" was an undefined
symbol, indicating that the C implementation has been installed and/or
configured incorrectly.
Compilers (and, in this case, linkers) print error messages for a
reason. You can't just ignore them. Once that prolem is corrected, we
can deal with any errors caused by the fact that the code doesn't
conform to a C standard published a quarter of a century ago, either by
modifying the code or, IMHO better, by learning how to configure Xcode
to compile modern C.
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-23 02:53 -0700
Re: Xcode issues, doesn't compile files Bartc <bc@freeuk.com> - 2015-04-23 11:51 +0100
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-23 04:39 -0700
Re: Xcode issues, doesn't compile files Bartc <bc@freeuk.com> - 2015-04-23 13:19 +0100
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-23 07:20 -0700
Re: Xcode issues, doesn't compile files Bartc <bc@freeuk.com> - 2015-04-23 15:33 +0100
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-23 08:50 -0700
Re: Xcode issues, doesn't compile files Johann Klammer <klammerj@NOSPAM.a1.net> - 2015-04-23 20:31 +0200
Re: Xcode issues, doesn't compile files Robert Wessel <robertwessel2@yahoo.com> - 2015-04-23 14:25 -0500
Re: x86_64 Noob <root@127.0.0.1> - 2015-04-23 21:39 +0200
Re: Xcode issues, doesn't compile files G G <gdotone@gmail.com> - 2015-04-23 12:50 -0700
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-24 10:37 -0700
Re: Xcode issues, doesn't compile files G G <gdotone@gmail.com> - 2015-04-24 11:15 -0700
Re: Xcode issues, doesn't compile files Keith Thompson <kst-u@mib.org> - 2015-04-23 13:02 -0700
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-24 06:22 -0700
Re: Xcode issues, doesn't compile files G G <gdotone@gmail.com> - 2015-04-24 10:13 -0700
Re: Xcode issues, doesn't compile files Alla _ <modelling.data@gmail.com> - 2015-04-24 10:34 -0700
Re: Xcode issues, doesn't compile files Hiidenkivi <hiidenkivi@nospam.no> - 2015-04-25 14:41 +0300
Re: Xcode issues, doesn't compile files Hiidenkivi <hiidenkivi@nospam.no> - 2015-04-25 15:05 +0300
Re: Xcode issues, doesn't compile files Keith Thompson <kst-u@mib.org> - 2015-04-25 13:25 -0700
Re: Xcode issues, doesn't compile files Hiidenkivi <hiidenkivi@nospam.no> - 2015-05-03 23:29 +0300
Re: Xcode issues, doesn't compile files Keith Thompson <kst-u@mib.org> - 2015-05-03 13:46 -0700
Re: Xcode issues, doesn't compile files Hiidenkivi <hiidenkivi@nospam.no> - 2015-05-04 03:06 +0300
Re: Xcode issues, doesn't compile files Keith Thompson <kst-u@mib.org> - 2015-05-03 18:06 -0700
csiph-web