Re: Help installing GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux