public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jie Zhang <jie.zhang@analog.com>
To: Andrew Polyak <apolyak@sio.midco.net>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Help installing GCC
Date: Mon, 04 Jan 2010 03:28:00 -0000	[thread overview]
Message-ID: <4B416068.8090106@analog.com> (raw)
In-Reply-To: <20100103204725.suem05d1qo8wksgk@mail.midco.net>

On 01/04/2010 10:47 AM, Andrew Polyak wrote:
> Hi.
>
> I'm trying to install GCC on my Kubuntu system.
>
> I downloaded it through the software manager and ran a .deb file.
>
> I believe that it is installed, but I don't know how to run it.
>
First try

$ gcc --version

It should print out something like

gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Then use your favorite editor to edit a file named hello.c

$ cat hello.c
#include <stdio.h>

int main ()
{
   printf ("Hello GCC!\n");
   return 0;
}

Compile it to an executable using GCC:

$ gcc -o hello hello.c

Run the executable:

$ ./hello
Hello GCC!

Finally you can further read GCC manual:

http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/


Jie

  reply	other threads:[~2010-01-04  3:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  2:47 Andrew Polyak
2010-01-04  3:28 ` Jie Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-04  9:10 Bill McEnaney
2005-07-06  9:34 Radoslav
2005-07-06 20:25 ` Ian Lance Taylor
     [not found] <BE070580.14E%kelmandor@hotmail.com>
2005-01-10  0:01 ` Help installing gcc dor kelman
2005-01-08  0:45 Charles Christena
2005-01-08  7:09 ` Long Li
2004-12-01 20:56 Help Installing GCC Jeffrey A. LeGay
2004-12-02 11:55 ` Claudio Bley
2003-12-12 18:38 Help installing gcc Ramadass, Ramanathan
2003-12-12 11:12 Rakesh Kumar - Software, Noida
2003-12-12  8:55 Josie Ellis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B416068.8090106@analog.com \
    --to=jie.zhang@analog.com \
    --cc=apolyak@sio.midco.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).