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 05-29-2010, 06:56 AM   #1
utkarsh.mahar
LQ Newbie
 
Registered: May 2010
Posts: 21

Rep: Reputation: 15
running c++ in linux


i m new to linux . how can I install c++ and run programs in it. I heard eclipse is a good IDE. plz guide me
 
Old 05-29-2010, 07:25 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
An IDE is a tool for editing, you could use anything. Hell, even
Code:
cat > mycode.cpp
...
...
<ctrl+d>
As for compiling, which I think is what you're wanting to know, try our old friends at google: http://www.google.co.uk/search?hl=en...+linux&spell=1
 
Old 05-29-2010, 07:30 AM   #3
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
Which distro of Linux are you running?

You will need a to have a number of packages installed, which you can probably get through your distro's package manager (apt-get or Synaptic in Debian based distros, yum in Red-Hat based ones). Debian has a meta-package called build-essential, which installs (among others) libc6-dev (C and C++ developement library) g++ (the GNU C++ compiler), make (for building complex programs), etc.

Eclipse may also be available via your package manager, but you can also get it from the site of the Eclipse foundation. It's written in Java, so you'll need at least Java runtime (and, I think, the Java development kit) installed, first.
 
Old 05-29-2010, 08:33 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Use the g++ compiler and any plain text editor, the better ones offer syntax highlighting for languages including C++.
 
Old 05-29-2010, 08:57 AM   #5
utkarsh.mahar
LQ Newbie
 
Registered: May 2010
Posts: 21

Original Poster
Rep: Reputation: 15
i m using red hat enterprise. i din even install it . someone else did it for me. how can i now install c++ and compiler or eclipse
 
Old 05-29-2010, 09:01 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
Quote:
I am using red hat enterprise
1) su
2) yum install gcc-c++
.. will provide the c++ compiler.
And the library used for c++ programs (= libstdc++)

3) yum search eclipse
will show all eclipse packages.
4) yum install eclipse*
will install all eclipse packages.
..

Last edited by knudfl; 05-29-2010 at 09:06 AM.
 
Old 05-29-2010, 09:03 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
As already stated, you use the package manager. This is in your menus--probably called something like "install software". Since you are using RedHat Enterprise, you will need to register with RedHat Network.
 
Old 05-29-2010, 10:01 AM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by pixellany View Post
you use the package manager. This is in your menus--probably called something like "install software". Since you are using RedHat Enterprise, you will need to register with RedHat Network.
If whoever installed RHEL paid for support and registered, then the package manager software should work. If paid for but not yet registered, I have no clue, but you should be able to find out next steps from RedHat.

If you haven't paid for support, I suggest you (the OP) read my recent post about newbie RHEL questions:
http://www.linuxquestions.org/questi...7/#post3985353
Probably you're using the wrong distribution for your purposes. Probably it will take less effort to start over with a different distribution than to push forward with RHEL. Obviously, I don't know your specific situation.
 
Old 05-29-2010, 04:11 PM   #9
utkarsh.mahar
LQ Newbie
 
Registered: May 2010
Posts: 21

Original Poster
Rep: Reputation: 15
i am using red hat enterprise. in order to install c n C++ do I have to download libc6-dev package and then install it through yum?? similarly do I have to install gcc compiler??
 
Old 05-29-2010, 04:31 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
No, you do not download system packages in Linux.
All packages are automatically downloaded and installed,
when you choose the package in the "Package Manager" or
by using the command line 'package handling tool' = 'yum'.
All dependencies are also automatically installed.


Example : # yum install gcc-c++ :

libstdc++ , glibc-devel , glibc-headers , etc.
will be automatically installed too.
....
....
Did you activate your Redhat account ?
Redhat EL5 is commercial, and not usable without an account.
If you don't want to pay : The free version of EL 5 is CentOS 5.5 ..

Last edited by knudfl; 05-29-2010 at 04:42 PM.
 
  


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
program running time comparison under Linux Desktop, Linux Server and Windows Xp crs_zxf Linux - Newbie 2 05-07-2009 11:27 AM
Windows running Firefox more secure than linux running it? moxieman99 General 14 04-04-2009 11:12 AM
Problems installing and running Frostwire on Acer One running Linpus Linux ricky1981 Linux - Newbie 1 12-19-2008 09:24 AM
Access for Multiple Linux servers from any cilent node running REDHAT LINUX 9 bv_uma Linux - Server 2 08-18-2006 01:17 AM
any linux distro can running in RAM , not need CD_ROM reading when running. wangcity Linux - General 3 09-18-2003 06:45 AM


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