From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: GNAT linker error Date: Mon, 26 Jan 2015 10:42:49 +0100 Organization: cbb software GmbH Message-ID: <1wu3xdn9lz4fw$.1vr9iw6he5glp.dlg@40tude.net> References: <63e1488a-6a1b-46e7-8984-240faef1fc67@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: p9a8jKAGz0rpkSSbWxF1gQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:24743 Date: 2015-01-26T10:42:49+01:00 List-Id: 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