LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-17-2004, 08:04 AM   #1
harun_acs
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
c program compilation


give me the datail steps for compiling the c program.
i have tried that by cc and gcc but i am unable to compile it .error is cc and gcc command not found .i have tried on redhat 9.0
 
Old 03-17-2004, 08:14 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
well, to compile a simple one file c program you would do something like this

gcc -Wall -o filename filename.c

-Wall turns on all warnings, -o filename makes the executable filename.

If you are getting a message that says gcc/cc is not found you probably need to install the redhat 9.0 gcc package.
 
Old 03-18-2004, 09:06 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
the simplest way to compile, say you have

func.cpp or func.c

is to just type

Code:
make func
and it will do the above steps for you.
 
Old 03-18-2004, 10:29 AM   #4
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Try here:

http://www.linuxquestions.org/questi...ticle&artid=33
 
  


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
qt program compilation error sateeshgalla Programming 1 08-26-2005 05:33 AM
gtk program compilation error RohanShrivastav Programming 5 02-16-2005 07:12 AM
Compilation of Program? drdroid Programming 5 12-09-2003 05:41 PM
GL program compilation woes PsychosisNode Programming 3 10-15-2003 10:18 PM
error during program compilation with RH7.1 Corinne Linux - Newbie 1 06-14-2001 08:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:37 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