PDA

View Full Version : C++ Programming in Ubuntu



Yes
July 1st, 2007, 12:36 AM
I have recently switched from Windows to Ubuntu, and I would like to re-learn C++. What I need to know is what compiler I should use, and how I make a GUI (Because in Windows, you would just use some of the Windows methods, I believe).

Also, any tutorials concerning OOP programming and GUIs in C++ would be much appreciated.

Thanks.

Smygis
July 1st, 2007, 01:09 AM
install the package build-essential and you get all the compilers you need.

And to make GUI's you first have to choose what widgets you wish to use.
GTK is most likely what you want. There is also Qt, wxWidgets and many more.

As for IDE (Altho you did not ask ;) ). I like Code::Blocks and geany. But i dont like anjuta.

And on to the main point in this post. Learn Python. Awsome language.

bashologist
July 1st, 2007, 01:45 AM
For C++ Gtk use "Gtkmm", or for Python use "Pygtk". Gtkmm has some really amazing documentation, but it's harder to program with certain things like pointers. For Gtk programming Python might be easier; C++ is more fun tho.

http://www.gtkmm.org/

bclark
July 1st, 2007, 04:40 AM
grab the anjuta ide 'sudo apt-get install anjuta' it's a pretty good c++ ide for smaller projects imho.

Check out: http://www.cplusplus.com/doc/tutorial/
It's a GREAT reference! Good luck!

Soybean
July 1st, 2007, 04:14 PM
install the package build-essential and you get all the compilers you need.
Just a point of clarification: the compiler installed by build-essential is called GCC. The easiest way to use it to compile a single C++ file is by running "g++" from the command line. For example, if your file is called test.cpp, and you want the executable to be called "superawesome", use the following:

g++ test.cpp -o superawesome

olejorgen
July 1st, 2007, 06:14 PM
You'll probably want to look into make too