* GPS on MacOS 10.9 doesn't find GTKAda @ 2014-02-07 23:16 Laurent 2014-02-10 0:48 ` John B. Matthews 2014-02-10 8:35 ` briot.emmanuel 0 siblings, 2 replies; 5+ messages in thread From: Laurent @ 2014-02-07 23:16 UTC (permalink / raw) Hi 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 ; Thanks Laurent ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GPS on MacOS 10.9 doesn't find GTKAda 2014-02-07 23:16 GPS on MacOS 10.9 doesn't find GTKAda Laurent @ 2014-02-10 0:48 ` John B. Matthews 2014-02-12 20:18 ` Laurent 2014-02-10 8:35 ` briot.emmanuel 1 sibling, 1 reply; 5+ messages in thread From: John B. Matthews @ 2014-02-10 0:48 UTC (permalink / raw) 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> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GPS on MacOS 10.9 doesn't find GTKAda 2014-02-10 0:48 ` John B. Matthews @ 2014-02-12 20:18 ` Laurent 0 siblings, 0 replies; 5+ messages in thread From: Laurent @ 2014-02-12 20:18 UTC (permalink / raw) Am Montag, 10. Februar 2014 01:48:20 UTC+1 schrieb John B. Matthews: > 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 From docs.adacore: >To build your own application, you should then setup a project file (see the GNAT documentation for >more details on project files), which simply contains the statement: Oops. I think I have read this article put somehow I have ignored this line :( Is quite clear compared to the stack overflow threads. Now both tests compile. Don't really need it for the moment but now I now that GPS works as it should. Thank you very much ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GPS on MacOS 10.9 doesn't find GTKAda 2014-02-07 23:16 GPS on MacOS 10.9 doesn't find GTKAda Laurent 2014-02-10 0:48 ` John B. Matthews @ 2014-02-10 8:35 ` briot.emmanuel 2014-02-12 20:12 ` Laurent 1 sibling, 1 reply; 5+ messages in thread From: briot.emmanuel @ 2014-02-10 8:35 UTC (permalink / raw) You cannot "with" a project file from an Ada source file (as you do in test.adb) You do this from your own project file instead. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GPS on MacOS 10.9 doesn't find GTKAda 2014-02-10 8:35 ` briot.emmanuel @ 2014-02-12 20:12 ` Laurent 0 siblings, 0 replies; 5+ messages in thread From: Laurent @ 2014-02-12 20:12 UTC (permalink / raw) @briot.e...@gmail.com: > You cannot "with" a project file from an Ada source file (as you do in test.adb) > > You do this from your own project file instead. Thank you very much. I have read the threads on stack overflow but I never interpreted it to put the "with gtkada" into the .gpr file. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-12 20:18 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-02-07 23:16 GPS on MacOS 10.9 doesn't find GTKAda Laurent 2014-02-10 0:48 ` John B. Matthews 2014-02-12 20:18 ` Laurent 2014-02-10 8:35 ` briot.emmanuel 2014-02-12 20:12 ` Laurent
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox