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 04-22-2003, 01:13 PM   #1
ph0tik
LQ Newbie
 
Registered: Apr 2003
Posts: 5

Rep: Reputation: 0
Question GCC compiler...?


Does Linux Red Hat come with a compiler built in (like GCC) that I can use? I don't understand all the stuff at gcc.gnu.org on installing a compiler but I want to program in Linux. I know how to use all the Linux software because I have worked on the school's computers but I want to program at home. Thanks.
 
Old 04-22-2003, 01:34 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
if it's not installed already, then it's on your disks.

Last edited by rshaw; 04-22-2003 at 01:36 PM.
 
Old 04-22-2003, 02:18 PM   #3
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
On the 3 distros you use, gcc should be installed...
To use it;
-open up a text editor,
-enter your code
-save with the name test.cpp(of courseit can be of anyother name)
-then invoke this command on a terminal:
gcc test.cpp -o test

This will generate a program named test...

Best regards,
 
Old 04-22-2003, 02:39 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
save with the name test.cpp(of courseit can be of anyother name)

no it should be a .c file. if it is .cpp then it is implicitly c++ code, and may well be interpretted as such and fail horribly.
 
Old 04-22-2003, 04:22 PM   #5
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
I see what you mean acid_kewpie... But he didn't mention which language he wanted to program in; since I use c++(with gcc) and since c code CAN be stored in .cpp file(c++ compilers CAN compile c code), I said .cpp

Best regards,
 
  


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
GCC Compiler rr_rr_29 Linux - Software 2 10-17-2005 05:14 AM
GCC compiler .. pashupathinath Programming 1 10-21-2004 01:20 PM
GCC Compiler HELP Otaking Linux - Newbie 5 04-08-2004 07:17 PM
GCC compiler? Forezt Linux - Newbie 2 11-23-2003 03:07 PM
GCC compiler ionic Programming 3 05-10-2001 09:59 AM


All times are GMT -5. The time now is 01: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration