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


Groups > comp.lang.c > #60674

Re: Fist steps in compiling, gcc commands confusion

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Fist steps in compiling, gcc commands confusion
Date Tue, 21 Apr 2015 12:09:08 -0700
Organization None to speak of
Lines 22
Message-ID <877ft5mh7v.fsf@kst-u.example.com> (permalink)
References <9f1b89ff-cf47-4e01-b137-ba263e9e75f1@googlegroups.com> <mh5s9k$l9k$1@reader1.panix.com>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="9825"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aI/s3FHyE/0Y01tVkjV3K"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:qIr56Y1oQU6/LuY6w0hMVgDYY94= sha1:QYpCUlTlFGmYwOyXJY5+hA2JZio=
Xref csiph.com comp.lang.c:60674

Show key headers only | View raw


John Gordon <gordon@panix.com> writes:
> In <9f1b89ff-cf47-4e01-b137-ba263e9e75f1@googlegroups.com> Alla _ <modelling.data@gmail.com> writes:
>> Different resources advice different commands to compile a file:
>
>> 1) gcc sample.c sample
>
> This tells gcc to compile the files "sample.c" and "sample".

No, it doesn't.  The file name "sample" doesn't have an extension,
so gcc isn't going to assume it's a source file to be compiled.
(Apparently it turns out that it assumes it's a linker script,
which is not what I would have guessed.)

Unless you already know exactly what gcc does with
    gcc sample.c sample
I think it's safe to assume that it's simply incorrect.

-- 
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


Thread

Fist steps in compiling, gcc commands confusion Alla _ <modelling.data@gmail.com> - 2015-04-21 08:18 -0700
  Re: Fist steps in compiling, gcc commands confusion Alla _ <modelling.data@gmail.com> - 2015-04-21 08:25 -0700
    Re: Fist steps in compiling, gcc commands confusion Morris Dovey <mrdovey@iedu.com> - 2015-04-21 10:56 -0500
      Re: Fist steps in compiling, gcc commands confusion David Brown <david.brown@hesbynett.no> - 2015-04-22 09:35 +0200
        Re: Fist steps in compiling, gcc commands confusion James Kuyper <jameskuyper@verizon.net> - 2015-04-22 11:15 -0400
          Re: Fist steps in compiling, gcc commands confusion David Brown <david.brown@hesbynett.no> - 2015-04-23 01:31 +0200
        Re: Fist steps in compiling, gcc commands confusion Keith Thompson <kst-u@mib.org> - 2015-04-22 08:43 -0700
          Re: Fist steps in compiling, gcc commands confusion Bartc <bc@freeuk.com> - 2015-04-22 18:57 +0100
            Re: Fist steps in compiling, gcc commands confusion Keith Thompson <kst-u@mib.org> - 2015-04-22 11:35 -0700
  Re: Fist steps in compiling, gcc commands confusion James Kuyper <jameskuyper@verizon.net> - 2015-04-21 12:01 -0400
  Re: Fist steps in compiling, gcc commands confusion John Gordon <gordon@panix.com> - 2015-04-21 16:01 +0000
    Re: Fist steps in compiling, gcc commands confusion Tim Prince <tprince@computer.org> - 2015-04-21 13:11 -0400
    Re: Fist steps in compiling, gcc commands confusion Keith Thompson <kst-u@mib.org> - 2015-04-21 12:09 -0700
  Re: Fist steps in compiling, gcc commands confusion Bartc <bc@freeuk.com> - 2015-04-21 18:25 +0100
    Re: Fist steps in compiling, gcc commands confusion Keith Thompson <kst-u@mib.org> - 2015-04-21 12:11 -0700
  Re: Fist steps in compiling, gcc commands confusion Keith Thompson <kst-u@mib.org> - 2015-04-21 11:16 -0700

csiph-web