Next: The Project Properties Editor, Previous: The Project Wizard, Up: Project Handling

### 7.9 The Project Dependencies Editor

You can edit the dependencies between projects through the contextual menu `Project->Dependencies...` in the Project View.

This view makes it easy to indicate that your project depends on external libraries, or other modules in your source code. For instance, you can give access to the GtkAda graphical library in your project by adding a project dependency to gtkada.gpr, assuming GtkAda has been installed in your system.

The dependencies also determine in what order your application is built. When you compile a project, the builder will first make sure that the projects it depends on are up-to-date, and otherwise recompile them.

When you select that contextual menu, GPS will open a dialog that allows you to add or remove dependencies to your project. New dependencies are added by selecting a project file name from one of several sources:

- One of the loaded project from the current project tree
- One of the predefined projects

  These are the projects that are found in one of the directories referenced in the `ADA_PROJECT_PATH` environment variable. Typically, these include third party libraries, such as GtkAda, win32ada, ...

- A new project created through the project wizard
- Any project file located on the disk

In all these cases, you will generally be able to choose whether this should be a simple dependency, or a limited dependency. The latter allows you to have mutually dependent projects (A depends on B, which in turns depends on A even indirectly), although you cannot reference the attribute of such a project in the current project (for instance to indicate that the compiler switches to use for A are the same as for B – you need to duplicate that information).

In some cases, GPS will force a limited dependency on you to avoid loops in the dependencies that would make the project tree illegal.