Using Anjuta in Ubuntu 8.04 to develop a GNOME C++ application (gtkmm)

You can install Anjuta 2.4.1 from the Syn­aptic pack­age man­ager. You also need to install a few devel­op­ment pack­ages. I do not know if there is a nice meta-​package such as build-​essential (used to install com­pilers et al), so I’ll just ask you to install the pack­ages by hand. A more eleg­ant way would be very much appre­ci­ated to see in the comments.

$ sudo apt-​get install build-​essential libgtkmm-2.4-dev auto­gen auto­make lib­tool intltool libglademm-2.4-dev

That is the order of install­a­tion when you go trial by error inside Anjuta to com­pile a pro­ject. Each pack­age draws in sev­eral other pack­ages. Also, if you have the Ubuntu 8.04 DVD in your drive, most of these pack­ages will be installed in a jiffy. We have the Greek loc­al­isa­tion enabled, so bear with us. Thanks to Gian­nis Kat­sam­piris for com­plet­ing the recent update of the Anjuta 2.4 loc­al­isa­tion.
Screenshot of Anjuta, initial screen (Localisation: Greek)
Once Anjuta is installed, you are presen­ted with the Anjuta main window.

We then click on File/New/Project (Αρχείο/Νέο/1. Έργο),

Project creation wizard

We click on For­ward here.

Choose project type

There are many many pro­ject types. We wade through and we pick to use C++ and GTKMM (C++ bind­ings for GTK+). We could pick any other vari­ation; GTKMM was a request from the Ubuntu-​gr mail­ing list.

Fill in some contact details

We then fill in some con­tact details.

Sorting out the project settings

There is an option to spe­cify at this stage external pack­ages. We opt not to spe­cify them now.

We are actually done!

Once you click Apply (Εφαρμογή) - the button with the green tick, Anjuta will create an ini­tial dummy pack­age (actu­ally a hello world applic­a­tion), and will run auto­mat­ic­ally the equi­val­ent of ./con­fig­ure for you.

Read to work!

Now, this is the final screen, when you start work­ing. Here you would click on Κατασκευή/Κατασκευή έργου (Build/Build Pro­ject), so that the pro­ject gets compiled.

Then, you would click on Κατασκευή/Εκτέλεση προγράμματος… (Build/Run program…) to run the program!

Start typing!

Here is shows that we have loc­ated the source file (main.cc), and we see main().

It takes about 3 second to com­pile a pro­gram with g++ (at least on my system). There­fore, the dead time between (a) Let’s com­pile it and (b) Oh, I am run­ning my pro­gram!, is under 5 seconds, which is good.

Discussion Area - Leave a Comment