LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-21-2008, 12:29 AM   #1
dhivyababulal
LQ Newbie
 
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
Unable to compile and run a C program in fedora


I hav fedora fc8 installed in my pc. I have written a simple C program in fedora terminal. Saved it as syscall.c. I tried to compile my program using cc and gcc commands like gcc syscall.c. But i got the error displaying bash: cc command not found. The same error turned up when i used gcc command. Similarly ./a.out command also returned the same error. how to rectify this and get my C programs compiled and exected?
 
Old 09-21-2008, 12:54 AM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
you need to have gcc installed. Easiest way to check is to:

gcc --version

If not, check out http://www.fedorafaq.org/#installsoftware and install it.

Hope this helps a little.
 
Old 09-21-2008, 01:26 AM   #3
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Specifically:
Quote:
yum install gcc
... or ...
yum install gcc-c++
... or even ...
apt-get install gcc-c++
 
Old 09-22-2008, 11:10 AM   #4
eth1
Member
 
Registered: May 2008
Posts: 97

Rep: Reputation: 20
Quote:
Originally Posted by paulsm4 View Post
Specifically:
Forgive me but does Fedora come with apt-get ? I had only seen yum which is the default package manager in Fedora.
 
  


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
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
Unable to run add or remove program shivsankarr Linux - Newbie 3 11-20-2007 11:07 PM
How Do I Run/Compile a Program Written in C? debsan Fedora 2 05-25-2006 02:58 PM
How to compile and run my first program vanhelsing Programming 2 07-11-2004 02:41 PM
how to compile and run c program under mandrake 9.2 ?? mschua44 Mandriva 7 02-26-2004 11:13 AM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration