Using Anjuta

Creating a project with Anjuta need just a few clicks but then we will take a look at the created files.

3.2.1. Create a new project

  1. Click on File ▸ New ▸ Project. The new project assistant appears.

  2. Click on Forward. The project selection page appears:

    Figure 3-2Project selection page
  3. Select Generic (minimal) project in the C page.

  4. Click on Forward.

    Figure 3-3Project basic information page

    Change Project Name to tutprog, the project name should contains only alpha numeric characters or underscore. Fill the remaining field.

  5. Click on Forward.

    Figure 3-4Project options page

    Click on Destination and create a new directory named tutprog for your new project. You need to avoid space in the directory name. Then, keep all other options to their default value to get a minimal project.

  6. Click on Forward.

    Figure 3-5Project summary page

    This is the final page of the assistant, check that everything is right.

  7. Click on Forward. Anjuta will create all needed files and directories, in the message window, you will see the following:

    Figure 3-6Project creation messages

    Then, is called and run the configure script. Finally Anjuta open the new project. You can directly build the project, as the main source contains a few lines of C and configure has been run.

3.2.2. Looking at

Example 3-4Anjuta minimal
dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta application wizard.

AC_INIT(tutprog, 0.1)




It is still quite simple with a bit more macros. Let's look at all unknown ones:


It is not a macros, just the marker to start a comment in M4, the language used to write It is like '#' is scripts or '//' in C++.


The AC_INIT macro uses the new form with package and version but AM_INIT_AUTOMAKE keeps the old one. It is not needed anymore.


This tells Autoconf to pass all defines in a file named config.h instead of using several -Dxxxx flags on the command line (see Section 3.1.4 ― Build project). It is easier when there are lots of them. A file named is created automatically from the using autoheader. Then config.h is created automatically like makefiles by configure. So it is painless for the developer.


This is the old form of the AC_OUTPUT, where you specify all output files instead of using AC_CONFIG_FILES.

3.2.3. Looking at

Example 3-5Anjuta minimal
## Process this file with automake to produce
## Created by Anjuta



bin_PROGRAMS = tutprog

tutprog_SOURCES = \

tutprog_LDFLAGS =

tutprog_LDADD =

Not much things in the neither:


It is used to give additional flags to the C preprocessor. Here it defines an additional PACKAGE_DATA_DIR constant set by configure


It defines some additional flags for the C compiler: all warning and add debugging information that we have already seen at the beginning of this tutorial (see Section 2.1 ― Using GCC)


It adds a places where you can put additional linker options for the tutprog program.


It adds a places where you can put additional libraries for the tutprog program.