comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GNAT linker error
Date: Mon, 26 Jan 2015 10:42:49 +0100
Date: 2015-01-26T10:42:49+01:00	[thread overview]
Message-ID: <1wu3xdn9lz4fw$.1vr9iw6he5glp.dlg@40tude.net> (raw)
In-Reply-To: bf6e28a9-ad80-41a2-9411-bd0e44ad583a@googlegroups.com

On Sun, 25 Jan 2015 15:15:32 -0800 (PST), hosszu.gabor90@gmail.com wrote:

> Thank you, adding -lpixman-1 made it work. But please explain me how it can happen that:
> - with GPS 5 it worked without lib pixman linker flag
> - "manually" it also worked
> - both of these mean execution of the following command: (I have compared them)
> gnatmake -d -P/home/myuser/own_projects/ada/AdaTest.gpr -vP2 -j4 -g
> So everything depends only on the project files (AdaTest.gpr and gtkada.gpr) which do not contain anything related to pixman.
> 
> And the program is this simple GtkAda example:
> 
> with Gtk.Box;         use Gtk.Box;
> with Gtk.Button;      use Gtk.Button;
> with Gtk.Label;       use Gtk.Label;
> with Gtk.Widget;      use Gtk.Widget;
> with Gtk.Main;
> with Gtk.Window;      use Gtk.Window;
> with Gtkada.Handlers; use Gtkada.Handlers;
> with Ada.Text_IO;
> with Glib; use Glib;
> procedure Main is
>    Win   : Gtk_Window;
>    Label : Gtk_Label;
>    Box   : Gtk_Vbox;
> begin
>    Gtk.Main.Set_Locale;
>    Gtk.Main.Init;
>    Gtk_New (Win);
>    Win.Set_Default_Size (500, 500);
>    Gtk_New_Vbox (Box);
>    Gtk_New (Label, "Hello world.");
>    Win.Add (Label);
>    Win.Show_All;
>    Gtk.Main.Main;
> end Main;

Pixman is related to cairo and cairo since GTK 3.x is the drawing engine
behind the GTK. Prior to 3.x, in 2.x it was custom GDK drawing used for
this. I don't remember if GDK drawing ever used pixman. So I suspect you
may have versions mismatch.

BTW, the example is incomplete. It does not have the destroy handler
attached needed to jump out of the events loop when you close the
application window through the window manager. The effect should be that
the window will be closed but the process still running.

The test refers to Gtkada.Handlers, but does not use it to connect to the
Destroy event. OK, it could not anyway due to accessibility issues. The
handler must be declared in a package at the library level. It would not
compile if you place it in the procedure Main.

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

  reply	other threads:[~2015-01-26  9:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25  9:45 GNAT linker error hosszu.gabor90
2015-01-25 10:27 ` Simon Wright
2015-01-25 12:29 ` hosszu.gabor90
2015-01-25 13:37   ` Simon Clubley
2015-01-25 14:35 ` Dmitry A. Kazakov
2015-01-25 16:27 ` Jeffrey Carter
2015-01-25 21:56 ` hosszu.gabor90
2015-01-25 22:25   ` Ludovic Brenta
2015-01-25 22:02 ` hosszu.gabor90
2015-01-25 23:15 ` hosszu.gabor90
2015-01-26  9:42   ` Dmitry A. Kazakov [this message]
     [not found] <33f8d552.50571683@news.alt.net>
1997-08-27  0:00 ` Gnat " Jerry van Dijk
  -- strict thread matches above, loose matches on Subject: below --
1997-07-31  0:00 Danny
replies disabled

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