LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to compile and run a C program in fedora (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-compile-and-run-a-c-program-in-fedora-671331/)

dhivyababulal 09-21-2008 12:29 AM

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?

scott_R 09-21-2008 12:54 AM

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.

paulsm4 09-21-2008 01:26 AM

Specifically:
Quote:

yum install gcc
... or ...
yum install gcc-c++
... or even ...
apt-get install gcc-c++

eth1 09-22-2008 11:10 AM

Quote:

Originally Posted by paulsm4 (Post 3286982)
Specifically:

Forgive me but does Fedora come with apt-get ? I had only seen yum which is the default package manager in Fedora.


All times are GMT -5. The time now is 06:30 AM.