Fedora Linux Support Community & Resources Center
  #1  
Old 25th December 2007, 05:22 AM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
Question beginners C++ compiler

I just started to learn C++ today and I need a good and basic C++ compiler which would be good and fast for basic C++ codes! any ideas on which compiler would be suitable?
If possible, please give me some hints on how to start using it right away.

thanks
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #2  
Old 25th December 2007, 05:43 AM
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,851
GCC.
http://en.wikipedia.org/wiki/GNU_Compiler_Collection

su
yum install gcc

Consider these, too:
yum install compat-libstdc++-33 compat-libstdc++-296 compat-gcc-34 compat-gcc-34-c++

If this is for a class, your prof should probably have some suggestions.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #3  
Old 25th December 2007, 05:44 AM
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 56
Posts: 12,371
( Moved to Programming )
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #4  
Old 25th December 2007, 07:09 PM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
how can I use it?

by the way, I don's have a prof, I'm learning it on my own!
and also, what I exactly want is a program that I can write my code in it and then with one click it shows me the result (for console programs) for example, there would be a place to write your code and a toolbar that has a build, run, etc buttons on it and an output at the bottom!
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #5  
Old 25th December 2007, 08:55 PM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
THANKS VERY MUCH
i KNOW HOW TO USE IT NOW!
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #6  
Old 26th December 2007, 04:04 AM
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,851
Quote:
Originally Posted by fengshaun
how can I use it?

by the way, I don's have a prof, I'm learning it on my own!
and also, what I exactly want is a program that I can write my code in it and then with one click it shows me the result (for console programs) for example, there would be a place to write your code and a toolbar that has a build, run, etc buttons on it and an output at the bottom!
I've never coded in C++, but I just had a class in Java (very similar languages). Basically, when working, I had a directory where I kept my Java classes and raw source files (*.java), subdivided by chapter in the book and so forth. I kept two windows open:

1 terminal for compiling and running the apps with java
1 text editor for writing the code.

I like Bluefish - it's got context highlighting and it worked for Java for me even though Bluefish is more geared towards web development. But there are other nice text editing programs (e.g. Kate) with context highlighting - poke around the repos.

No need to yell, by the way.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner

Last edited by forkbomb; 26th December 2007 at 04:08 AM.
Reply With Quote
  #7  
Old 26th December 2007, 05:20 AM
linuxpcmancn Offline
Registered User
 
Join Date: Dec 2007
Location: /China/BeiJing
Age: 27
Posts: 252
Quote:
Originally Posted by fengshaun
how can I use it?

by the way, I don's have a prof, I'm learning it on my own!
and also, what I exactly want is a program that I can write my code in it and then with one click it shows me the result (for console programs) for example, there would be a place to write your code and a toolbar that has a build, run, etc buttons on it and an output at the bottom!
It seems as if you would like to have a C++ IDE just likes the IDE in windows which only

need a click then the program runs.But gcc/g++ is just a command line tool,man gcc or man

g++ you can get all the information you want.C/C++ IDE in linux system,MinGW Developer

Studio is a good choice.But I suggest you thinking in linux,not windows.
__________________
An alternative way of life is to love or be loved…

#what's to love > /dev/null

#what's be loved > /trash

:D :D

Last edited by linuxpcmancn; 26th December 2007 at 05:22 AM.
Reply With Quote
  #8  
Old 26th December 2007, 05:28 AM
mdulzo Offline
Registered User
 
Join Date: Oct 2006
Location: Ann Arbor, MI
Posts: 124
When ever i use an IDE now, they seem too confusing. I was using Eclipse for a while, but I always end up back with vim and gcc. I do remember bloodshed's dev-c++ being my favorite IDE ever. It was simple and intuitive. Sadly, their project has stalled and I don't think theres a linux port (its GPL'd windows software without a linux port, crazy huh?)

Anyways, if you take a little time to learn them: vim, make, gdb, and gcc will be your best friend
Reply With Quote
  #9  
Old 26th December 2007, 06:23 AM
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,851
Ahh, I see now. An IDE. Yeah, try Eclipse. Think yum install eclipse-sdk will get you a pretty extensive IDE for a variety of languages.

Never could get into IDE's myself, though. We did a little bit with them in my last programming class and it seemed like more of a hindrance than anything, but nice for debugging. Then again, I'm sort of a KISS guy.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #10  
Old 26th December 2007, 06:30 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,917
Quote:
Originally Posted by linuxpcmancn
It seems as if you would like to have a C++ IDE just likes the IDE in windows which only

need a click then the program runs.But gcc/g++ is just a command line tool,man gcc or man

g++ you can get all the information you want.C/C++ IDE in linux system,MinGW Developer

Studio is a good choice.But I suggest you thinking in linux,not windows.
Yes this is correct. gcc, ld and make are just command line tools, but if you learn to use then quite powerful. Also consider the 'jam' builder tool ["yum -y install jam"].

There are numerous IDEs for Linux, but I am not a fan of any IDE. Eclipse for C++ is generic and common and works OK [eclipse and eclipse-cdt packages], KDevelope anjuta have fans.

There are a huge number of sw development packages for fedora. Use pirut and go to the
Development/Development Tools list.
Reply With Quote
  #11  
Old 29th December 2007, 01:37 AM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
ok, now on another computer, I install gcc and compat-libstdc++-33 compat-libstdc++-296 compat-gcc-34 compat-gcc-34-c++ but when I type:

g++ something.cpp

it says:

bash: command not found.

what should I do?
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #12  
Old 29th December 2007, 06:35 AM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
Code:
yum install gcc-c++
Reply With Quote
  #13  
Old 29th December 2007, 04:54 PM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
works...thanks
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #14  
Old 29th December 2007, 05:45 PM
fengshaun Offline
Registered User
 
Join Date: Aug 2007
Posts: 115
ok now I want to give my program (baby program) to my friend who is unfortunately using windows. So, how do I compile this .cpp source in windows so others would be able to use it there!?
__________________
[fengshaun@fedora_8]$ su -
password:
[fengshaun@fedora_8]# http://fengshaun.wordpress.com
weblog accepted
[fengshaun@fedora_8]#
Reply With Quote
  #15  
Old 29th December 2007, 06:17 PM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
programs compiled for Unix/Linux cannot be executed in Windows and vice versa. Therefore, you would need to compile the source code in Windows.

Just a thought: although people on this forum are glad to help, asking every question you have about c++ programming on this forum is not a good way to learn c++. You really need to get a book or look up tutorials online.

davidj
Reply With Quote
Reply

Tags
beginners, compiler

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Option GCC, Intel Compiler, PathScale mounterriver Using Fedora 2 8th November 2009 02:31 PM
Beginners book kantu Programming & Packaging 6 2nd March 2009 12:28 AM
Looking for Beginners guide jac2 Using Fedora 5 28th February 2007 01:48 AM
Beginners help 357mag Using Fedora 3 9th February 2005 08:51 PM


Current GMT-time: 08:44 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Nsukka Photos - San Ignacio Photos - Hollywood Travel Photos on Instagram