PDA

View Full Version : How to set up g++?



smart61
September 10th, 2006, 07:52 PM
I have installed ubuntu from CD and want to do some C++ development. I don't see anything for g++ in the 'Add Programs' GUI under development.

I did find g++-4.* in the package management GUI as well as gcc-*, and make. I added them, the software was downloaded and installed, but there doesn't seem to be anything on the system just called g++ or gcc. I also don't see things like /usr/include populated with basic includes.

Thanks,
smart61

nereid
September 10th, 2006, 08:35 PM
Hi,

open a terminal and issue the following command to get a working gcc installation



sudo apt-get install build-essential

smart61
September 10th, 2006, 10:08 PM
Thanks, that's great. Just one more question...

How would I have known that from the online docs and why isn't something like that obviously available via the GUI interface?

Ok, that was two more questions.

Thanks again!
smart61

spamsickle
September 11th, 2006, 12:21 AM
I don't know the answer to your 2 more questions, but your initial question was very timely. I just installed Ubuntu, and wanted to know how to get g++ up and running. Thanks for asking, and thanks to Nereid for answering.

nereid
September 11th, 2006, 08:27 AM
I have got the solution from http://ubuntuguide.org IMHO this is not available from the simple install manager because it is not something that everybody needs. I don't know how your GUI installer application is called as I use Kubuntu (there it is called adept but I use the commandline most of the time).

rplantz
September 12th, 2006, 06:13 AM
Thanks, that's great. Just one more question...

How would I have known that from the online docs and why isn't something like that obviously available via the GUI interface?

Ok, that was two more questions.

Thanks again!
smart61

Do you mean via Synaptic? It is available that way.

Finding what to do is a real hassle. Searching Synaptic for "g++" does not bring up build-essential, but you need that package in order to get the libraries.

Also, if you want the info documentation, you need to install the gcc-doc package.

nereid
September 12th, 2006, 06:33 AM
Do you mean via Synaptic?

Aren't there two GUI installer? A simple one and a normal one. The simple one doesn't have the option to install gcc, as far as I know.

rplantz
September 14th, 2006, 03:55 AM
Aren't there two GUI installer? A simple one and a normal one. The simple one doesn't have the option to install gcc, as far as I know.

You're right. The simple one called "Add/Remove Applications" and it's under the "Applications" menu. It seems to be limited to "end-user" applications. The meaning of the term "user" depends upon context. I've read many assembler manuals that describe the assembly language programmer as "user."

The more advanced one ("normal" for me -- another word that must be defined in context) is Synaptic Package Manager, under the System->Administration menu.

DarkPCTroll
September 23rd, 2006, 02:49 PM
Hey nereid, Thanks for the Terminal command line [-o< , it was very useful, I was nuts because of that and then I realized I had the IDEs but not the compilers LOL!!

Dark PC Troll

nereid
September 24th, 2006, 01:39 PM
No problem, glad I could help you.