?
Solved

Use virtual PC compile C

Posted on 2005-05-16
4
Medium Priority
?
379 Views
Last Modified: 2013-12-06
I am running Fedora on MS virtual PC.

but I am not able to compile C program.

I opened a terminal and input command such as rm, cp, ls. They works fine.

However, when i try:

$cc -o program program.c

it say:

bash: c: command not found

Oh why? Does there have other way to compile C on Fedora?
0
Comment
Question by:ddlam
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
knollbert earned 1500 total points
ID: 14010002
Are you sure you install the compiler
I don't think its a default option

0
 
LVL 2

Expert Comment

by:Shan_rocks
ID: 14010499
Try compiling your program with gcc.

$gcc -o program program.c

Run your program  : ./program
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 14010951
cc is a symbolic link to gcc .
So it should be fine. Please check whether you gcc rpm's installed or else install them from the fedora source cd .

libgcc, gcc etc .

-surya.
0
 
LVL 2

Expert Comment

by:Shan_rocks
ID: 14011130
You can try compiling with

$c++ -o program program.c

$./program
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question