comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: GPS on MacOS 10.9 doesn't find GTKAda
Date: Sun, 09 Feb 2014 19:48:20 -0500
Date: 2014-02-09T19:48:20-05:00	[thread overview]
Message-ID: <ld97kl$c8l$1@dont-email.me> (raw)
In-Reply-To: <b6a466b2-bdc9-4759-a02c-72db38b65f20@googlegroups.com>

On 2/7/14, 6:16 PM, Laurent wrote:
>
> I am learning Ada. For the moment a GUI is not really needed for my programs but i was curious and tried the Xadalib-2013 which contains GtkAda and some other things precompiled for MacOS.
>
> Put this in my profile file:
>
> PATH=/usr/local/bin:usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:$PATH
> #path for gnat ada compiler + gtkada
> export PATH=$PATH:/usr/local/xadalib-2013/bin:/usr/local/gnat/bin:$PATH
> export GPR_PROJECT_PATH=/usr/local/xadalib-2013/lib/gnat:$GPR_PROJECT_PATH
> export XDG_DATA_DIRS=/usr/local/xadalib-2013/share
>
> When I try to compile this:
>
> with gtkada.gpr
>
> procedure Test is
> Begin
>      Null;
> End Test;
>
> Fails with the message that gtkada.ads can't be found.
>
> This code code from open classroom fails with the message that gtk.ads can't be found.
>
> WITH Gtk.Main ;       USE Gtk.Main ;
> WITH Gtk.Window ;     USE Gtk.Window ;
>
>
> PROCEDURE Test01 IS
>     win : Gtk_window ;
> BEGIN
>     Init ;
>     Gtk_New(Win) ;
>     Win.show_all ;
>     Main ;
> END Test01 ;

You can use the gtkada-config script to get the required compiler and 
linker arguments:

gnatmake test01 `gtkada-config`

Alternatively, you can 'with "gtkada"` in your .gpr file, as discussed here:

<http://stackoverflow.com/a/7464775/230513>

Both approaches are covered in "Getting started with GtkAda":

<http://docs.adacore.com/gtkada-docs/gtkada_ug/_build/html/getting_started.html#how-to-compile-an-application-with-gtkada>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

  reply	other threads:[~2014-02-10  0:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 23:16 GPS on MacOS 10.9 doesn't find GTKAda Laurent
2014-02-10  0:48 ` John B. Matthews [this message]
2014-02-12 20:18   ` Laurent
2014-02-10  8:35 ` briot.emmanuel
2014-02-12 20:12   ` Laurent
replies disabled

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