ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Its used for compiling source code written in ANSI C Language.
Dont worry about findig where this program is stored in your distribution ( if u insist try the find command or whereis command)
you just type gcc at ur shell and u will find out !
For learning C language a lots of online as well study books are avilable.
Hi,
I thought I'd give my input on this. Basically when you write a program in C you use a text editor ( my choice is vi ) to write the code. Then you use the gcc compiler to compile the code and create a program you can execute. Try going on line and search for tutorials on C programming.
Good luck!
actually now it stands for 'GNU Compiler Collection'
but thats of no consequence..
check out the man page.. there are more options than you can shake a stick at... but u only need a few of them..
ex..
gcc mysource.c -Wall -o binfilename
down with all ide'z, ive wrote megs and megs of code in kwrite with gcc.. a debgger would be nice but ive been too lazy to learn gdb..
the compiler collection part is because it supports all kindz of code.. like c++, java, and uh others.. that was a prett big list huh.. check out http://gcc.gnu.org/ for more info..
I'll agree about IDEs for programming with one exception, which in my narrow definition of great software is one of the most astonishing pieces of software ever written.
Emacs with the highlighted syntax option is the best IDE for java, perl, or C I have ever seen. I don't think much of the keystroke navigation (Ctrl+F etc.) but that's because it's a really old program and Ctrl keys were around before arrow keys!
I am fairly new to linux, but you can use
which gcc or which cc
which tells you where your compiler resides
and
gcc -v also tells you the version that you have.
My question. Is there an easy way to upgrade the gcc compiler, as I spent an hour configuring and installing gcc3.0.4 today with erroprs at the end and lots of warnings along the way.
I did tar -xvf gcc-3.0.4.tar which unpacked into /tmp/gcc-3.0.4
then ./configure
then make bootstrap
then make install
But it failed miserably in the make bootstrap section, cannot remember the errors.
Pico is a cute editor too.. if you dont know your way around "vi" touch pico.. pico is nice. pico don't bite.. pico be good text editor.
save pico file as myfirstcfile.c
then at $ or %
type
gcc myfirstcfile.c -o myfirstexe
the -o myfirstcfile part just says that instead of turning myfirstcfile.c into an executable named a.out it is named "myfirstexe" whatever you want.. then you can compile lots of programs in the same directory without overwriting your a.out's
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.