LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2010, 12:30 PM   #1
junmuz
LQ Newbie
 
Registered: Feb 2010
Posts: 9

Rep: Reputation: 0
Launching GCC....


I am a beginner at the linux forums. I am unable to launch gcc through command terminal.I am using red hat platform. Can any 1 help me out.
 
Old 02-07-2010, 12:35 PM   #2
switch10
LQ Newbie
 
Registered: Dec 2009
Location: Mammoth Lakes California/ currently in Austin Texas for a year
Distribution: slackware, ubuntu, ubuntu studio
Posts: 8

Rep: Reputation: 1
it should just be:

Code:
 gcc program.c
where "program.c" is your C program

are you getting some kind of error? Is GCC installed?
 
Old 02-07-2010, 06:49 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
rpm -qa |grep -i gcc

will show if its installed
http://kbase.redhat.com/faq/docs/DOC-2531
 
Old 02-08-2010, 05:58 AM   #4
junmuz
LQ Newbie
 
Registered: Feb 2010
Posts: 9

Original Poster
Rep: Reputation: 0
@ chrism 01, I m getting this message when i have typed the command u told.

gcc-gfortran-4.1.2-46.el5
libgcc-4.1.2-46.el5
gcc44-c++-4.4.0-6.el5
gcc44-4.4.0-6.el5
gcc-4.1.2-46.el5
gcc-c++-4.1.2-46.el5

How can i execute the file, after compilation. What commands do i need to use to execute the file..
 
Old 02-08-2010, 06:06 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
If you don't tell the compiler otherwise, it will create an executable called "a.out". You can compile and run with the following commands.
Code:
gcc program.c
./a.out
If you can I suggest you try to get your hands on a copy of "The C Programming Language" by Kernighan and Ritchie. This is covered in the first few pages.

Cheers,

Evo2.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X not launching Saxu Linux - Newbie 3 08-11-2005 03:25 PM
launching a script from rc.d invar Linux - Software 5 08-16-2004 04:42 PM
re: launching evolution as su and as me ergo_sum Linux - Newbie 11 12-10-2003 12:31 PM
Launching Nethack msymms Linux - Newbie 5 11-03-2003 10:59 AM
Launching Files hank@$3800 Linux - General 5 06-20-2002 05:00 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration