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


Groups > comp.lang.c > #60657

Re: Fist steps in compiling, gcc commands confusion

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.c
Subject Re: Fist steps in compiling, gcc commands confusion
Date 2015-04-21 16:01 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <mh5s9k$l9k$1@reader1.panix.com> (permalink)
References <9f1b89ff-cf47-4e01-b137-ba263e9e75f1@googlegroups.com>

Show all headers | View raw


In <9f1b89ff-cf47-4e01-b137-ba263e9e75f1@googlegroups.com> Alla _ <modelling.data@gmail.com> writes:

> Hello!

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

> 2) gcc sample.c -o sample

This tells gcc to compile the file "sample.c" and create an output file
named "sample" instead of the default name.

> 3) gcc -o sample.c

This command is an error, because you haven't specified any files
to compile.

> What does -o stand for? 

It tells gcc to use a specific output filename instead of the default
name.

These are very basic questions; I suggest you do a web search for a gcc
tutorial.

-- 
John Gordon         Imagine what it must be like for a real medical doctor to
gordon@panix.com    watch 'House', or a real serial killer to watch 'Dexter'.

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