LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 11:30 AM   #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, 11:35 AM   #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, 05:49 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

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

will show if its installed
http://kbase.redhat.com/faq/docs/DOC-2531
 
Old 02-08-2010, 04: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, 05:06 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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



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 02:25 PM
launching a script from rc.d invar Linux - Software 5 08-16-2004 03:42 PM
re: launching evolution as su and as me ergo_sum Linux - Newbie 11 12-10-2003 11:31 AM
Launching Nethack msymms Linux - Newbie 5 11-03-2003 09:59 AM
Launching Files hank@$3800 Linux - General 5 06-20-2002 04:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 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
Open Source Consulting | Domain Registration