Ada GPS IDE can't seem to find GtkAda

I have installed both the GNAT Programming Studio (GPS) and GtkAda. They both seem to work fine, but when I try to build the Simple Window project under New Project from Template, I get a bunch of errors saying "file not found." This seems to be a directory/dependency sort of problem - GPS doesn't know where to look for GtkAda. I'm running Windows 7, and have GPS installed at C:\GNAT\2011, and GtkAda installed at C:\GtkAda. I tried adding GtkAda to my PATH; at the moment my PATH user variable includes C:\GNAT\2011\bin, and my Path System variable includes C:\GtkAda\bin. Any advice on resolving this problem is greatly appreciated!


  • There are two things here.

    First, "project" is key. Whenever you're building something that depends on a library like GtkAda, it's much much easier if (a) you use GNAT Project to manage it, and (b) you use the GPR(s) provided by the library - always assuming it does, of course.

    In the case of GtkAda, that means that your GPR needs to "with" GtkAda;

    with "gtkada";
    project Tinkering is

    Second, gnatmake or gprbuild needs to be able to find gtkada.gpr.

    The easiest way is to install GtkAda in such a way that gtkada.gpr is in the default place that gnatmake/gprbuild expect to find GPR files. This is $prefix/lib/gnat. GtkAda obeys this convention, so you could install GtkAda under the same root as your compiler. I don't know why that's not recommended anyway.

    If you don't want to do that, you can add the correct location to the environment variable ADA_PROJECT_PATH, for example in your case set it to C:\GtkAda\lib\gnat.

    There is a lot of good stuff in the GtkAda README at, and in the GtkAda User's Guide which I see from the README is also included with the installed package at (in your case) C:\GtkAda\doc\GtkAda\gtkada_ug.