comp.lang.ada
 help / color / mirror / Atom feed
From: hreba <f_hreba@yahoo.com.br>
Subject: Gtkada link problem
Date: Sun, 5 Jul 2020 16:57:30 +0200	[thread overview]
Message-ID: <hme82qFqonmU1@mid.individual.net> (raw)

I installed GNAT 2020 from Adacore together with Gtkada on a PC running 
Linux Mint.
I downloaded Dmitry's Gtkada_Contributions as source file.
When I build his Test_Gtk_Tasking example as standalone unit, it 
compiles, links and runs. But I have a linker problem  when I use it as 
a static library.

My directory structure is
|
+ Aux
| + lib
| + obj
| + aux.ads
| + aux.adb
| + aux.gpr
|
+ Main
| + obj
| + main.adb
| + main.gpr
|
main.adb:
--------
with Aux;
procedure Main is
begin
    Aux.Test_Gtk_Tasking;
end Main;

aux.ads:
-------
package Aux is
    procedure Test_Gtk_Tasking;
end Aux;

aux.adb:
-------
<Dmitry's with clauses>
package body Aux is
<Dmitry's procedure Test_Gtk_Tasking>
end Aux;

aux.gpr:
-------
with "gtkada";
with "/home/frank/Lib/Ada/gtkada_contributions/gtkada_contributions";

library project Aux is

    for Library_Name use "aux";
    for Source_Dirs use (".");
    for Object_Dir use "obj";
    for Library_Dir use "lib";
    for Library_Kind use "static";
    for Library_Interface use ("Aux");
    for externally_built use "false";

end Aux;

main.gpr:
--------
with "../Aux/aux";

project Main is
    for Source_Dirs use (".");
    for Object_Dir use "obj";
    for Exec_Dir use ".";
    for Main use ("main.adb");

    package Linker is
       for Default_Switches ("Ada") use ("-L../Aux/lib", "-laux");
    end Linker;

end Main;

Upon gprbuild everything compiles and then comes a list of "undefined 
reference errors terminating in

/opt/GNAT/2020/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.3.1/ld: 
/home/frank/Exercises/Ada/Gtkada_Contrib/Aux/lib/libaux.a(p__aux_0.o):(.gcc_except_table+0x94): 
undefined reference to `gtk__main__router__quit_error'

nm Aux/lib/libaux.a contains mainly lines beginning with 'U' (undefined 
symbol).

I am pretty sure that I just need some linker switches and that the 
above ones are useless.

Any help?
-- 
Frank Hrebabetzky, Kronach	+49 / 9261 / 950 0565

             reply	other threads:[~2020-07-05 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 14:57 hreba [this message]
2020-07-05 18:56 ` Gtkada link problem Dmitry A. Kazakov
2020-07-06 10:49   ` hreba
replies disabled

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