comp.lang.ada
 help / color / mirror / Atom feed
* GPS and GTK
@ 2011-09-18 22:19 TI Launchpad
  2011-09-19  0:04 ` Alex Mentis
  2011-09-19  7:21 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 9+ messages in thread
From: TI Launchpad @ 2011-09-18 22:19 UTC (permalink / raw)


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!



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-18 22:19 GPS and GTK TI Launchpad
@ 2011-09-19  0:04 ` Alex Mentis
  2011-09-19  7:46   ` Simon Wright
  2011-09-19  7:21 ` Dmitry A. Kazakov
  1 sibling, 1 reply; 9+ messages in thread
From: Alex Mentis @ 2011-09-19  0:04 UTC (permalink / raw)


TI Launchpad 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. 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!

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-18 22:19 GPS and GTK TI Launchpad
  2011-09-19  0:04 ` Alex Mentis
@ 2011-09-19  7:21 ` Dmitry A. Kazakov
  2011-09-26 19:07   ` TI Launchpad
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2011-09-19  7:21 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-19  0:04 ` Alex Mentis
@ 2011-09-19  7:46   ` Simon Wright
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Wright @ 2011-09-19  7:46 UTC (permalink / raw)


"Alex Mentis" <foo@invalid.invalid> writes:

> TI Launchpad 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. 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!
>
> 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.

Answered at Stack Overflow:
http://stackoverflow.com/questions/7464251/ada-gps-ide-cant-seem-to-find-gtkada



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-19  7:21 ` Dmitry A. Kazakov
@ 2011-09-26 19:07   ` TI Launchpad
  2011-09-26 19:42     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 9+ messages in thread
From: TI Launchpad @ 2011-09-26 19:07 UTC (permalink / raw)


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!



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-26 19:07   ` TI Launchpad
@ 2011-09-26 19:42     ` Dmitry A. Kazakov
  2011-09-26 20:40       ` Simon Wright
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2011-09-26 19:42 UTC (permalink / raw)


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.

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-26 19:42     ` Dmitry A. Kazakov
@ 2011-09-26 20:40       ` Simon Wright
  2011-09-26 21:52         ` Gene
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Wright @ 2011-09-26 20:40 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-26 20:40       ` Simon Wright
@ 2011-09-26 21:52         ` Gene
  2011-10-01 22:32           ` TI Launchpad
  0 siblings, 1 reply; 9+ messages in thread
From: Gene @ 2011-09-26 21:52 UTC (permalink / raw)


On Sep 26, 10:40 pm, Simon Wright <si...@pushface.org> wrote:
> "Dmitry A. Kazakov" <mail...@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.

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 .




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS and GTK
  2011-09-26 21:52         ` Gene
@ 2011-10-01 22:32           ` TI Launchpad
  0 siblings, 0 replies; 9+ messages in thread
From: TI Launchpad @ 2011-10-01 22:32 UTC (permalink / raw)


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!



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-10-02  0:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-18 22:19 GPS and GTK TI Launchpad
2011-09-19  0:04 ` Alex Mentis
2011-09-19  7:46   ` Simon Wright
2011-09-19  7:21 ` Dmitry A. Kazakov
2011-09-26 19:07   ` TI Launchpad
2011-09-26 19:42     ` Dmitry A. Kazakov
2011-09-26 20:40       ` Simon Wright
2011-09-26 21:52         ` Gene
2011-10-01 22:32           ` TI Launchpad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox