How to install a C++ compiler in Debian GNU/Linux?

I am new to Linux and just installed Debian; however, I'm really confused with how to install a C++ compiler? Also, I did some research and found codes to use in the Terminal but I am new to the Terminal and do not know how to use it correctly.
closed account (1yR4jE8b)
sudo apt-get install g++
Also check out clang.
Learn to use the terminal. Otherwise people will laugh at you.

But seriously, it'll pay off. It's a lot more productive (IMO) and if you ever get a job in the systems or network world you won't really have a choice but use the terminal.
To compile almost everything written C++ (includes g++)

sudo apt-get install build-essential

Or alternatively, if g++ is really all you want

sudo apt-get install g++
I think it would be a good idea to learn how to use terminal first.. you're gonna use it a lot in Linux distros like Debian.

you can use

sudo apt-get install build-essential


aptitude install build-essential

if you're planning to use the compiler for programming purposes, you may also want to install an IDE (I am currently using eclipse and it's the only one I know so far)

aptitude install eclipse

If you plan on learning about the shell/terminal , you can have this fantastic (e)book
The Linux Command Line (tlcl)

just use a search engine with the title as a keyword.the pdf is free.

sudo apt-get install buid-essential
The above command will install gcc , g++ , gdb , gnu as .
While you are getting acquainted with the shell you can use an IDE like codeblocks which will do all the not-so-elegant-typing-commands for compiling when you just press a button
In general terms it's better to install the meta package build-essential

Clang it's probably not ready yet for production under Linux, it's a good compiler for learning purpose though.
KDevelop is a really good IDE for Linux IMO.

Or check out Qt if you want to do GUI stuff - it has the QtCreator IDE.

Hope this helps.
Topic archived. No new replies allowed.