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: Initializing sum to zero wouldn't compile |
| Date | 2015-08-21 10:28 -0700 |
| Organization | None to speak of |
| Message-ID | <lnfv3c1rg5.fsf@kst-u.example.com> (permalink) |
| References | <5f70d0ca-8b6b-4c11-a2d3-10a5fb65c1c3@googlegroups.com> <mr73f2$ka$1@dont-email.me> <ec44201f-1580-4625-91f3-683a937e3d34@googlegroups.com> |
Alla _ <modelling.data@gmail.com> writes:
> On Friday, August 21, 2015 at 3:55:03 PM UTC+4, James Kuyper wrote:
>> On 08/21/2015 07:39 AM, Alla _ wrote:
[...]
>> > The version that doesn't:
>> > // a program that calculates the average of an array
>> > of 3 floating-point values
>> >
[code snipped]
>>
>> That program compiles without any error or warning messages when I use
>> gcc 4.8.4 and the following command line options:
>>
>> -std=c99 -pedantic -Wall -Wpointer-arith -Wcast-align
>> -Wstrict-prototypes -Wmissing-prototypes
>>
>> Which version of which compiler are you using? What options are you
>> setting for it? What are the messages it produces to indicate that
>> there's a problem?
>
> It's a mystery. Before posting here I have run the program
> a few times, all with the same error
> ld: can't link with a main executable for architecture x86_64
>> collect2: ld returned 1 exit status
If you're asking about a compile-time (or, in this case, link-time)
error, please include the exact error message in your post.
If I had seen the avove message I could have told you that it very
probably had nothing to do with your source code. If there's an error
in your code (say, a syntax error or an undeclared identifier), the
compiler will usually print a message referring to the line on which the
error occurs. This looks more like some kind of configuration error,
having nothing to do with the initialization of sum.
You could as easily have gotten the same error if you had compiled the
original program, or a simple "hello, world" program. I don't know what
would have caused it. Now that you're no longer seeing the error, it's
probably not worth pursuing.
--
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
Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 04:39 -0700
Re: Initializing sum to zero wouldn't compile James Kuyper <jameskuyper@verizon.net> - 2015-08-21 07:54 -0400
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 05:27 -0700
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-21 10:28 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 11:15 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 05:30 -0700
Re: Initializing sum to zero wouldn't compile Ike Naar <ike@iceland.freeshell.org> - 2015-08-21 12:40 +0000
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 11:16 -0700
Re: Initializing sum to zero wouldn't compile Siri Cruz <chine.bleu@yahoo.com> - 2015-08-21 07:41 -0700
Re: Initializing sum to zero wouldn't compile Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-08-21 10:56 -0400
Re: Initializing sum to zero wouldn't compile Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2015-08-21 09:28 -0600
Re: Initializing sum to zero wouldn't compile Barry Schwarz <schwarzb@dqel.com> - 2015-08-21 10:02 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-21 11:21 -0700
Re: Initializing sum to zero wouldn't compile Barry Schwarz <schwarzb@dqel.com> - 2015-08-21 22:27 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-22 02:25 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-22 03:50 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-22 13:18 +0100
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-22 11:21 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-22 21:55 +0100
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-26 01:36 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-26 11:24 +0100
Re: Initializing sum to zero wouldn't compile Barry Schwarz <schwarzb@dqel.com> - 2015-08-22 17:17 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-26 01:26 -0700
Re: Initializing sum to zero wouldn't compile Barry Schwarz <schwarzb@dqel.com> - 2015-08-26 02:27 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-26 04:21 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-26 12:37 +0100
Re: Initializing sum to zero wouldn't compile Richard Heathfield <rjh@cpax.org.uk> - 2015-08-26 13:06 +0100
Re: Initializing sum to zero wouldn't compile Bartc <bc@freeuk.com> - 2015-08-26 13:43 +0100
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-26 14:03 +0100
Re: Initializing sum to zero wouldn't compile Richard Heathfield <rjh@cpax.org.uk> - 2015-08-26 14:06 +0100
Re: Initializing sum to zero wouldn't compile Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-06 15:14 -0700
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-26 11:38 -0700
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-26 11:44 -0700
Re: Initializing sum to zero wouldn't compile Barry Schwarz <schwarzb@dqel.com> - 2015-08-22 10:49 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-22 11:16 -0700
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-29 07:19 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-29 15:35 +0100
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-30 02:11 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-30 12:28 +0100
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-30 15:02 -0700
Re: Initializing sum to zero wouldn't compile Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-30 22:36 +0100
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-30 16:10 -0700
Re: Initializing sum to zero wouldn't compile Bartc <bc@freeuk.com> - 2015-08-31 00:14 +0100
Re: Initializing sum to zero wouldn't compile Keith Thompson <kst-u@mib.org> - 2015-08-30 19:56 -0700
Re: Initializing sum to zero wouldn't compile Bartc <bc@freeuk.com> - 2015-08-29 16:57 +0100
Re: Initializing sum to zero wouldn't compile Bartc <bc@freeuk.com> - 2015-08-29 17:37 +0100
Re: Initializing sum to zero wouldn't compile Alla _ <modelling.data@gmail.com> - 2015-08-30 02:14 -0700
csiph-web