c++ install?

I decided to try Linux (ubuntu to be specific) so what do I install now? I am lost :(
You need to get GCC.

You can either get it with your package manager, SVN, or download it and make it.

http://gcc.gnu.org/
closed account (z05DSL3A)
I think on ubunto you run:

sudo apt-get install build-essential

closed account (S6k9GNh0)
GCC is the standard for Linux. Of course, you may easily use others, GCC wil probably be the most convenient. For C++, be sure to get GCC-C++ or G++.
GCC ( the gnu compiler collection ) is generally included on all versions of ubuntu.

If you want to use G++ ( a front end for gcc that uses C++ as the default language ) you can go to
applications->accessories->terminal and type in
sudo apt-get install g++
In order to compile C++ code ( make it executable ), you would go to a terminal and type in
g++ -o NameOfYourOutputFile NamesOfYourInputFile(s).
I'm on Ubuntu right now.
It usually comes with it, but just to be sure you may aswell do the following
$ sudo apt-get install binutils
wait for the command to complete. Then you can simply type
$ gcc myInputFiles -o myOutputFile -lstdc++
or
$ g++ myInputFiles -o myOutputFile

As in myspy2plus' post, terminal is located in Applications -> Accessories. Or you can type Alt + F2; type in "bash" and make sure "run in terminal" is checked before clicking Run.

Note that the $ represents the terminal prompt and you don't type it.
I think on ubunto you run:

sudo apt-get install build-essential


This. (although it's Ubuntu)

build-essential installs not only g++, but also a lot of other things that you'll no doubt end up needing, such as make.
Last edited on
closed account (z05DSL3A)
Sorry about the typu! :0)
Thank you ... however unfortunately my laptop cord went belly-up AGAIN! And is aggravating :(
// Will test once I get it back
Last edited on
Topic archived. No new replies allowed.