Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GPS and GTK

397 views
Skip to first unread message

TI Launchpad

unread,
Sep 18, 2011, 6:19:57 PM9/18/11
to
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 gtk.ads 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!

Alex Mentis

unread,
Sep 18, 2011, 8:04:24 PM9/18/11
to
TI Launchpad wrote:

Even though the GtkAda installer likes to install GtkAda rooted at
C:\GtkAda by default, I've always had better success changing the root
GtkAda install path to C:\GNAT\2011 (or whatever year of GNAT you're
using). It seems to help GNAT find all the stuff the GtkAda projects
are dependent upon.

Alex

Dmitry A. Kazakov

unread,
Sep 19, 2011, 3:21:43 AM9/19/11
to
On Sun, 18 Sep 2011 15:19:57 -0700 (PDT), in comp.lang.ada you wrote:

> 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 gtk.ads not found." This seems to be a directory/
> dependency sort of problem - GPS doesn't know where to look for
> GtkAda.

GPS (GPRbuild) looks for installed projects in

<gnat-root-directory>/lib/gnat/

gtkada.gpr should be located there.

Additionally to that there are GPR_PROJECT_PATH and ADA_PROJECT_PATH
environment variables.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Simon Wright

unread,
Sep 19, 2011, 3:46:05 AM9/19/11
to

TI Launchpad

unread,
Sep 26, 2011, 3:07:04 PM9/26/11
to
I can't find gtkada.gpr. I've uninstalled GtkAda and reinstalled it
under the GNAT folder, so my directory structure looks like this: "C:
\GNAT\2011\GtkAda". I'm not sure what I need to do to get GtkAda to
work - do you guys have any further suggestions? I really appreciate
your help so far!

Dmitry A. Kazakov

unread,
Sep 26, 2011, 3:42:41 PM9/26/11
to
On Mon, 26 Sep 2011 12:07:04 -0700 (PDT), TI Launchpad wrote:

> I can't find gtkada.gpr.

It must be under <gtkada-install-directory>\lib\gnat

> I've uninstalled GtkAda and reinstalled it
> under the GNAT folder, so my directory structure looks like this: "C:
> \GNAT\2011\GtkAda".

Then it should be in "C:\GNAT\2011\GtkAda\lib\gnat"

> I'm not sure what I need to do to get GtkAda to
> work - do you guys have any further suggestions?

As I wrote, there are many ways. In your case you could make sure that the
directory containing gtkada.gpr is in ADA_PROJECT_PATH, i.e.
ADA_PROJECT_PATH is like: "...;C:\GNAT\2011\GtkAda\lib\gnat;...".

Also PATH should contain "C:\GNAT\2011\GtkAda\bin". Beware that GIMP and
GPS also come with Gtk binaries, you have to choose the order in which they
are loaded. I am usually using GIMP binaries first, because they have more
recent versions. But that could be incompatible of course.

Simon Wright

unread,
Sep 26, 2011, 4:40:39 PM9/26/11
to
"Dmitry A. Kazakov" <mai...@dmitry-kazakov.de> writes:

> Also PATH should contain "C:\GNAT\2011\GtkAda\bin". Beware that GIMP
> and GPS also come with Gtk binaries, you have to choose the order in
> which they are loaded. I am usually using GIMP binaries first, because
> they have more recent versions. But that could be incompatible of
> course.

I wouldn't know about that.

My first thought (and the way I meant to recommend) was to install
GtkAda *in the same place as* the compiler, not one level down from it.

I've just tried this, and the installation dialog asks 2 questions: what
compiler (default C:\GNAT\2011) and where to put GtkAda (default
C:\GtkAda).

I edited this so that "where to put GtkAda" read the same as the
compiler location, ie C:\GNAT\2011, and installed.

Now when I go to the demos, for example
c:\GNAT\2011\share\examples\gtkada\calendar_combo,
I type just "gnatmake -Pdefault" and the demo builds as expected.

Gene

unread,
Sep 26, 2011, 5:52:33 PM9/26/11
to
On Sep 26, 10:40 pm, Simon Wright <si...@pushface.org> wrote:
Simon's advice is perfect. It's a pain to set ADA_LIBRARY_PATH and
PATH on every machine you'll ever deal with forever or else add the
copious path information needed in build commands.

In my installation, gtkada.gpr is in lib/gnat .

TI Launchpad

unread,
Oct 1, 2011, 6:32:41 PM10/1/11
to
Dear everyone,

Thanks so much for your help! I have gotten it to work; you guys were
exactly right, I just needed to install GtkAda in C:\GNAT\2011. By
doing that, all the GtkAda files got put where they needed to be
relative to the original GNAT files. Anyways, I really appreciate all
your help!
0 new messages