JFD
2023-01-21 22:53:37 UTC
Bonjour à tous,
Je tente d’utiliser sur linux debian (Debian 5.10.158-2) gtkada (),
avec Gnat Studio (20210423)
Le programme affiche une simple fenêtre, c’est un exemple que j’ai
trouvé dans les tutos :
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 ;
Le résultat :
Output saved in /home/jfd/Temp/developpement/ada/test_w/obj/messages.txt
gprbuild -d -P/home/jfd/Temp/developpement/ada/test_w/test_w.gpr
/home/jfd/Temp/developpement/ada/test_w/src/test_w.adb
Bind
[gprbind] test_w.bexch
[Ada] test_w.ali
Link
[link] test_w.adb
/opt/gnatstudio/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot
find -lgcc_s
collect2: error: ld returned 1 exit status
gprbuild: link of test_w.adb failed
…
J’ai positionné les variables d’environnement :
prefix="/usr/gtkada/gtk-bin";
GPR_PROJECT_PATH="$prefix/lib64";
LD_LIBRARY_PATH="$prefix/lib64:/usr/lib/x86_64-linux-gnu";
PKG_CONFIG_PATH="$prefix/lib64/pkgconfig:/usr/lib/pkgconfig:";
PKG_CONFIG_PATH="$PKG_CONFIG_PATH/usr/share/pkgconfig:";
PKG_CONFIG_PATH="$PKG_CONFIG_PATH/usr/lib/x86_64-linux-gnu/pkgconfig";
GDK_PIXBUF_MODULE_FILE="$prefix/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache";
GDK_PIXBUF_MODULEDIR="$prefix/lib64/gdk-pixbuf-2.0/2.10.0/loaders/";
FONTCONFIG_FILE="$prefix/etc/fonts/fonts.conf";
XDG_DATA_DIRS="$prefix/share";
XDG_CONFIG_DIRS="$prefix/etc";
GSETTINGS_BACKEND=memory;
GLADE_BASE_DIR=\"$prefix\";
export PATH GPR_PROJECT_PATH;
export LD_LIBRARY_PATH;
export PKG_CONFIG_PATH;
export GDK_PIXBUF_MODULEDIR;
export GDK_PIXBUF_MODULE_FILE;
export FONTCONFIG_FILE XDG_DATA_DIRS;
export GLADE_BASE_DIR;
export GSETTINGS_BACKEND;
Je tente d’utiliser sur linux debian (Debian 5.10.158-2) gtkada (),
avec Gnat Studio (20210423)
Le programme affiche une simple fenêtre, c’est un exemple que j’ai
trouvé dans les tutos :
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 ;
Le résultat :
Output saved in /home/jfd/Temp/developpement/ada/test_w/obj/messages.txt
gprbuild -d -P/home/jfd/Temp/developpement/ada/test_w/test_w.gpr
/home/jfd/Temp/developpement/ada/test_w/src/test_w.adb
Bind
[gprbind] test_w.bexch
[Ada] test_w.ali
Link
[link] test_w.adb
/opt/gnatstudio/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot
find -lgcc_s
collect2: error: ld returned 1 exit status
gprbuild: link of test_w.adb failed
…
J’ai positionné les variables d’environnement :
prefix="/usr/gtkada/gtk-bin";
GPR_PROJECT_PATH="$prefix/lib64";
LD_LIBRARY_PATH="$prefix/lib64:/usr/lib/x86_64-linux-gnu";
PKG_CONFIG_PATH="$prefix/lib64/pkgconfig:/usr/lib/pkgconfig:";
PKG_CONFIG_PATH="$PKG_CONFIG_PATH/usr/share/pkgconfig:";
PKG_CONFIG_PATH="$PKG_CONFIG_PATH/usr/lib/x86_64-linux-gnu/pkgconfig";
GDK_PIXBUF_MODULE_FILE="$prefix/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache";
GDK_PIXBUF_MODULEDIR="$prefix/lib64/gdk-pixbuf-2.0/2.10.0/loaders/";
FONTCONFIG_FILE="$prefix/etc/fonts/fonts.conf";
XDG_DATA_DIRS="$prefix/share";
XDG_CONFIG_DIRS="$prefix/etc";
GSETTINGS_BACKEND=memory;
GLADE_BASE_DIR=\"$prefix\";
export PATH GPR_PROJECT_PATH;
export LD_LIBRARY_PATH;
export PKG_CONFIG_PATH;
export GDK_PIXBUF_MODULEDIR;
export GDK_PIXBUF_MODULE_FILE;
export FONTCONFIG_FILE XDG_DATA_DIRS;
export GLADE_BASE_DIR;
export GSETTINGS_BACKEND;