PDA

View Full Version : g++



Fonon
August 19th, 2007, 05:55 PM
Hi. I'm trying to get into programming with C++, and I recently downloaded Geany. It claimed it didn't work because it couldn't find the "g++". So, I tried Anjuta, and the same thing happened. I did some research, and it turns out that it is the compiler, but the installation instructions are very unclear to me. Could anyone help me out on this one? Thanks.

Jessehk
August 19th, 2007, 05:58 PM
sudo aptitude update && sudo aptitude install build-essential


:)

Fonon
August 19th, 2007, 06:03 PM
I put all of that in the terminal at one time, right? Thanks!

Jessehk
August 19th, 2007, 06:42 PM
I put all of that in the terminal at one time, right? Thanks!

Yes. By default Ubuntu does not install the compilers and libraries necessary to program in C and C++.

The build-essential package installs everything. The command I gave you is actually 2 commands linked together by the "&&" which runs the second one if the first one succeeds.

The first command:


sudo aptitude update


Updates the software sources and the second command:


sudo aptitude install build-essential


installs the build-essential package.

Fonon
August 19th, 2007, 06:46 PM
Thank you! I tried it, and it was just what I needed.