LinuxQuestions.org
Register a domain and help support LQ
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 03-31-2011, 12:39 AM   #1
divya s
Member
 
Registered: Mar 2011
Posts: 40

Rep: Reputation: 0
how to install a c++ compiler


how to install a c++ compiler
 
Old 03-31-2011, 12:51 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
The easiest way would be to install g++ using your package manager. What distro are you using?

Evo2.
 
Old 03-31-2011, 12:54 AM   #3
retxed
Member
 
Registered: Sep 2009
Location: Chennai
Distribution: Ubuntu 11.10 and back track 4
Posts: 45

Rep: Reputation: 9
For Fedora I think

Quote:
yum install gcc-c++
should do it.

you might miss one or more of the other tools that you'll want
to have. You could go for broke and just do:

Quote:
yum groupinstall "Development Tools"
that will install everything you'd need (only do that if you have a
fast net connection)
 
Old 03-31-2011, 01:12 AM   #4
kindofabuzz
Member
 
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 45
Ubuntu based distros:
Code:
sudo apt-get install build-essential
 
Old 03-31-2011, 01:20 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,672
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
For OpenSuse:
Code:
zypper install gcc-c++
 
Old 03-31-2011, 02:29 AM   #6
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thanks for repling.

Quote:
Originally Posted by retxed View Post
For Fedora I think



should do it.

you might miss one or more of the other tools that you'll want
to have. You could go for broke and just do:



that will install everything you'd need (only do that if you have a
fast net connection)



I did "gcc-c++"to install g++. Now that it shows a error msg that "cout,cin and endl" are not declared in that scope. What should i do now.Will be waiting for your reply.
 
Old 03-31-2011, 02:31 AM   #7
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,672
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
#include <iostream>

using namespace std;

or

std :: cout << "hell";
 
Old 03-31-2011, 02:52 AM   #8
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thank you

thank you for your response.Now i have no errors.I want to learn the shell commands used in linux, i know very few like vi,ls,gcc,g++,rm thats it.I want to know more as i am a beginer, can you suggest me best source to get the information about these commands.
 
Old 03-31-2011, 02:55 AM   #9
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,672
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by divya s View Post
i know very few like vi,ls,gcc,g++,rm thats it.
GCC: http://gcc.gnu.org/
ls, rm: http://rute.2038bug.com/index.html.gz
vi: http://www.vim.org/
GDB: http://www.gnu.org/software/gdb/
 
Old 03-31-2011, 06:18 AM   #10
retxed
Member
 
Registered: Sep 2009
Location: Chennai
Distribution: Ubuntu 11.10 and back track 4
Posts: 45

Rep: Reputation: 9
Quote:
Originally Posted by divya s View Post
thank you for your response.Now i have no errors.I want to learn the shell commands used in linux, i know very few like vi,ls,gcc,g++,rm thats it.I want to know more as i am a beginer, can you suggest me best source to get the information about these commands.
There's a book named "UNIX concepts and Applications" by Sumitabha Das.Try it won't regret getting a copy.
Best book that have come across for beginners, and obviously there is Google and awesome man documentaion in Linux.

Hope it helps !!
 
Old 03-31-2011, 06:31 AM   #11
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
fine

thank you for your reference, will surely try that book
 
  


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
Uncertain how to configure/install packages & compiler before install VMware on FC8. Azazwa Linux - Newbie 1 03-28-2009 08:27 PM
So I need a C compiler to install a c compiler. Makes sense. vic305 Linux - Software 8 12-17-2008 11:30 PM
C compiler install Regis Linux - Newbie 12 05-19-2008 11:38 AM
install the g++ compiler iandroul Linux - General 15 02-28-2007 11:04 AM
How do I install a C compiler? genesis1923 Linux - Newbie 8 09-24-2003 03:17 PM


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